top | item 46851690

(no title)

ekelsen | 28 days ago

I think it commutes even when one or both inputs are NaN? The output is always NaN.

discuss

order

addaon|28 days ago

NaNs are distinguishable. /Which/ NaN you get doesn't commute.

ekelsen|28 days ago

I guess at the bit level, but not at the level of computation? Anything that relies on bit patterns of nans behaving in a certain way (like how they propagate) is in dangerous territory.

DavidVoid|28 days ago

Unless you compile with fast-math ofc, because then the compiler will assume that NaN never occurs in the program.