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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.3
    • None
    • 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

        1. MATH-1089.patch
          1 kB
          Gilles Sadowski

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: