Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6406

Combination of multiply and compareTo BigDecimal methods returns unexpected result

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0M12
    • 5.0M16
    • Classlib
    • 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.

      Attachments

        Activity

          People

            tellison Tim Ellison
            rzschech Richard Zschech
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment