Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Win2K, Sun JDK1.5.0_05 b05

      Description

      MathUtils.round(39.245, 2) results 39.24, however it should be 39.25, with default rounding mode BigDecimal.ROUND_HALF_UP.

      I found that internally MathUtils.round multiplies the given number by 10^scale.
      39.245 * 100.0 results 3924.49999...5 , and after this the calculation is not correct any more.

        Attachments

        1. math-151.patch
          11 kB
          Luc Maisonobe

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              buzaz Buza Zoltán
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: