You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix sNaN behavior of .minimum, .maximum, .minimumMagnitude and .maximumMagnitude. (#3361)
* Bring the behavior of Self.minimum, .maximum, .minimumMagnitude and .maximumMagnitude in line with the IEEE 754 rules.
Specifically, if either argument is a signaling NaN, the result should be a quiet NaN. Previously, signaling NaN inputs were treated identically to quiet NaN inputs.
Some other changes folded in with this:
- Formally define which argument is returned if lhs == rhs or abs(lhs) == abs(rhs) in the case of the Magnitude versions. This guarantees that the set {min,max} is identitical to the set {lhs,rhs} so long as neither argument is NaN. This is not only a nod to formalism; it's also a critical property for generic head-tail arithmetic to simulate wider types.
- Added test coverage for these four operations.
0 commit comments