Commons Math
  1. Commons Math
  2. MATH-1089

Precision.round() returns different results when provided negative zero as double or float

    Details

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

      Description

      Precision.round(-0.0d, x) = 0.0
      Precision.round(-0.0f, x) = -0.0

      After discussion on the mailinglist, the result should always be -0.0.

        Activity

        Thomas Neidhart 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 ]
        Gilles made changes -
        Attachment MATH-1089.patch [ 12623624 ]
        Luc Maisonobe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Thomas Neidhart
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development