CSR :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
For various math library functions, there are multiple plausible behaviors in some special cases. Starting with IEEE 754-2008 and continuing with IEEE 754-2019, the standard makes recommendations for handling those special values. In some of the special cases, the IEEE recommendations do not match the pre-existing behavior defined for java.lang.Math and java.lang.StrictMath. The java.lang.{Math, StrictMath} classes both long predate the floating-point standard to provide recommendations for the math library. These differences, and other notable ties to IEEE 754-2019 should be noted in the specification of java.lang.Math. The differences include: * cos(0.0) = 1.0 * exp(0.0) = 1.0 * acos(1.0) = 0.0 * acos((+/- infinity) = pi/2 * log(1.0) => 0.0 * log10(1.0) => 0.0 * hypot(+/-0, +/-0) => +0.0 The Math/StrictMath implementations are expected to conform to most of these behaviors, but the current specification doesn't explicitly require them too.
|