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

Correct scale handling of BigDecimal.sqrt

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 26
    • core-libs
    • In Review

      The intention of preferred scale policy of BigDecimal.sqrt is that it would follow the IEEE 754 standard policy for preferred exponent, where the scale is the negated exponent, see

      https://bugs.openjdk.org/browse/JDK-4851777?focusedId=13847551&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13847551

      However, the specification and implementation just use integer division by two of the scale, which will not give the same results for odd scales.

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

              Created:
              Updated: