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

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment