Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-161

PlaneAngle Numerical Accuracy

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Implemented
    • None
    • 1.0
    • angle
    • None

    Description

      The current PlaneAngle class introduces unnecessary round-off errors during use since it internally converts all values to turns. For example, it is currently impossible to represent the radians value Double.MIN_NORMAL exactly since the internal multiplication introduces errors: PlaneAngle.ofRadians(Double.MIN_NORMAL).toRadians() does not equal Double.MIN_NORMAL. We should restructure this API so that values are stored exactly and multiplication is only performed when required.

      This issue was discovered during work on GEOMETRY-124. Use of the new Reduce class added two more floating point operations to angle normalization and caused a regression in commons-geometry-spherical.

      Attachments

        Activity

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

          People

            erans Gilles Sadowski
            mattjuntunen Matt Juntunen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment