@@ -16477,6 +16477,11 @@ Historically, libc returns NUM for NUM vs (sNaN or qNaN), and may return
1647716477sNaN for qNaN vs sNaN. With the recent libc versions, libc follows IEEE754-2008:
1647816478NUM vs sNaN -> qNaN; NUM vs qNaN -> NUM; qNaN vs sNaN -> qNaN; sNaN vs sNaN -> qNaN.
1647916479
16480+ Note that that arithmetic on an sNaN doesn't consistently produce a qNaN,
16481+ so arithmetic feeding into a minnum can produce inconsistent results.
16482+ Such as `fmin(sNaN+0.0, 1.0)` can produce qNaN or 1.0 depending on whether `+0.0`
16483+ is optimized out.
16484+
1648016485If either operand is a qNaN, returns the other non-NaN operand. Returns
1648116486NaN only if both operands are NaN or either operand is sNaN.
1648216487If the operands compare equal, returns either one of the operands.
@@ -16529,6 +16534,11 @@ Historically, libc returns NUM for NUM vs (sNaN or qNaN), and may return
1652916534sNaN for qNaN vs sNaN. With the recent libc versions, libc follows IEEE754-2008:
1653016535NUM vs sNaN -> qNaN; NUM vs qNaN -> NUM; qNaN vs sNaN -> qNaN; sNaN vs sNaN -> qNaN.
1653116536
16537+ Note that that arithmetic on an sNaN doesn't consistently produce a qNaN,
16538+ so arithmetic feeding into a maxnum can produce inconsistent results.
16539+ Such as `fmax(sNaN+0.0, 1.0)` can produce qNaN or 1.0 depending on whether `+0.0`
16540+ is optimized out.
16541+
1653216542If either operand is a NaN, returns the other non-NaN operand. Returns
1653316543NaN only if both operands are NaN or either operand is sNaN.
1653416544If the operands compare equal, returns either one of the operands.
0 commit comments