Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283143

Use minimal-length literals to initialize PI and E constants

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 19
    • 19
    • core-libs
    • b14

    Description

      Depending on the range of the number line, a double value has between 15 and 17 digits of decimal precision. The literal used to initialize Math.PI and Math.E have several digits more precision than that maximum.

      That is potentially confusing to readers of the code and the minimum length strings to exactly represent the value in question should be used instead.

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              darcy Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: