On Thu, 2 Jun 2022 08:22:11 GMT, Raffaello Giulietti <d...@openjdk.java.net> wrote:
>> src/java.base/share/classes/java/lang/Math.java line 823: >> >>> 821: * @apiNote >>> 822: * This method corresponds to the convertTowardPositive operation >>> 823: * defined in IEEE 754. >> >> Probably what is meant is IEEE `convertToIntegerTowardPositive` (not >> `convertTowardPositive`). >> However, that's another kind of rounding, which always rounds any >> non-integral value toward positive infinity, not just ties. This is not what >> happens with this method. > >> not just ties > Plz. disregard this 3 words Okay, checking the IEEE 754-2019 spec again, there are operations to round a floating-point value to an integral-valued floating-point value (roundToIntegral{$ROUNDING_DIRECTION_ATTRIBUTE} and separately operations to round from a floating-point value to a value in an integer format (convertToInteger{$ROUNDING_DIRECTION_ATTRIBUTE} ). However, as noted, there is no IEEE 754 operations for rounding up only for ties. I'll remove the API notes for the round methods; thanks for catching this. ------------- PR: https://git.openjdk.java.net/jdk/pull/8876