News for hackers. Stuff that matters.
Re:Optimizations Enabled by -ffast-Math by beagle3 on Wednesday October 20, 2021 @11:19AM (#28931729)
I often use NaNs on purpose to designate “unknown”, and its properties of “infecting” computations mean that I don’t have to check every step - just at the end of the computation.

R goes even farther, and uses one specific NaN (out of the million-billions) to signal “not available”, while other NaNs are just NaNs.

Its properties, used properly, make code much more simple and sane.

There are no comments on this comment yet.