Harmony
  1. Harmony
  2. HARMONY-6406

Combination of multiply and compareTo BigDecimal methods returns unexpected result

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0M12
    • Fix Version/s: 5.0M16
    • Component/s: Classlib
    • Labels:
      None

      Description

      The following test fails:

      BigDecimal testInstance = BigDecimal.TEN.multiply(new BigDecimal("0.1"));
      int result = testInstance.compareTo(new BigDecimal("1.00"));
      assertEquals(0, result);

      I expect 'result' to be 0, but am obtaining -1.

        Activity

        Tim Ellison made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Tim Ellison [ tellison ]
        Fix Version/s 5.0M16 [ 12315337 ]
        Resolution Fixed [ 1 ]
        Richard Zschech created issue -

          People

          • Assignee:
            Tim Ellison
            Reporter:
            Richard Zschech
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development