On Wed, 25 May 2022 08:56:27 GMT, Raffaello Giulietti <d...@openjdk.java.net> wrote:
>> Joe Darcy has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains four additional commits >> since the last revision: >> >> - Respond to review feedback; make another pass to link methods to IEEE 754 >> operations. >> - Merge branch 'master' into JDK-8273346 >> - Add floor and ceil. >> - JDK-8273346: Examine use of "rounding mode" and "rounding policy" in Math >> and StrictMath > > src/java.base/share/classes/java/lang/Math.java line 771: > >> 769: * This method corresponds to the convertToIntegerTiesToEven >> 770: * operation defined in IEEE 754. >> 771: * > > IEEE `convertToIntegerTiesToEven` rounds ties to the even integer. > The method's spec, however, requires ties to round toward positive infinity. > Unfortunately, IEEE 754 doesn't offer a `convertToIntegerTiesToPositive` Good catch; found a different 754 operation that seems to fit. > src/java.base/share/classes/java/math/RoundingMode.java line 49: > >> 47: * exponent range of {@code BigDecimal}, the mathematical result will >> 48: * be exactly representable in the result precision or fall between >> 49: * two representable values. In the case of falling between two > > Perhaps better would be > `two adjacent representable values.` Agreed; adjusted in subsequent push. ------------- PR: https://git.openjdk.java.net/jdk/pull/8876