-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 26
-
Component/s: core-libs
-
b22
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.
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.
- csr for
-
JDK-8370151 Correct scale handling of BigDecimal.sqrt
-
- Closed
-
- relates to
-
JDK-4851777 Add BigDecimal sqrt method
-
- Closed
-
- links to
-
Commit(master)
openjdk/jdk/a0e0b2d3
-
Review(master)
openjdk/jdk/27882