Non-finite results

NaN, the infinities, and signed zero.

These are in the corpus for the cross-target comparison rather than for the reader. NaN is the one value WebAssembly does not fully pin: the payload bits, and the sign of a NaN produced from non-NaN operands, are both left to the implementation. So a NaN computed here and a NaN computed in a browser may differ in bits while being equally correct, and if those bits ever reached a snapshot the golden suite would fail for a reason that is not a bug.

Every route to a NaN the language offers is therefore exercised, so that the native and WebAssembly snapshots have to agree on all of them.

Undefined quotients and products.

zeroover_zero=00=NaN
zerotimes_infinity=0·∞=NaN

Out of domain. Nomo has no complex numbers, so these are NaN and not errors.

rootof_negative=0−1=NaN
logof_negative=ln⁡(0−1)=NaN
arcsineout_of_range=asin⁡(2)=NaN

The indeterminate difference.

infinityless_infinity=∞−∞=NaN

The infinities themselves are exactly representable and carry units.

positive=10=∞
negative=0−10=-∞
withunits=1⁢m0=∞⁢m

Signed zero is a real IEEE 754 distinction and a deterministic one, unlike a NaN payload, so it is pinned rather than normalised away. Note that 0 - 0.0 is positive zero: only unary negation reaches the other one.

negativezero=−0
positivezero=0−0=0
sumof_zeros=0+negativezero=0+0=0

The difference is observable, which is why it is worth pinning.

reciprocalof_negative_zero=1negativezero=10=-∞