Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1089

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: