-
Enhancement
-
Resolution: Unresolved
-
P4
-
17
-
None
The IEEE 754-2019 standard tightened the specification its negate operation so that is it a sign bit operation rather than an arithmetic operation. Operationally, that means that IEEE 754-2019 negate is also required to flip the sign bit of the input if the input is a NaN, even though the sign of a NaN doesn't have a meaning per se. See sections 5.5.1 and 6.3 of that standard.
The dneg/fneg JVM instructions do not have a similar requirement and are allowed to return any NaN for a NaN input.
The dneg/fneg JVM instructions do not have a similar requirement and are allowed to return any NaN for a NaN input.