Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.3
    • Labels:
      None
    • Environment:

      Windows 7, IntelliJ IDEA 10.5.4.

      Description

      package org.apache.commons.math3.util
      example of usage of round functions of Precision class:

      Precision.round(0.0f, 2, BigDecimal.ROUND_UP) = 0.01
      Precision.round((float)0.0, 2, BigDecimal.ROUND_UP) = 0.01
      Precision.round((float) 0.0, 2) = 0.0
      Precision.round(0.0, 2, BigDecimal.ROUND_UP) = 0.0

      Seems the reason is usage of extending float to double inside round functions and getting influence of memory trash as value.

      I think, same problem will be found at usage of other round modes.

        Activity

        Oleksandr Muliarevych created issue -
        Thomas Neidhart made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 3.3 [ 12324600 ]
        Resolution Fixed [ 1 ]
        Oleksandr Muliarevych made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Thomas Neidhart made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Luc Maisonobe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Oleksandr Muliarevych
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development