Re:Optimizations Enabled by -ffast-Math
by kazinator on Thursday October 21, 2021 @01:52PM
(#28948313)
If NaN and Inf values can still happen, but you don't have reliable ways of working with them, that is poor.
I think what people really want is a sane floating point mode that throws exceptions instead of these Inf and NaN things, so if their program isn't debugged, they get a clear signal by way of its abnormal termination.
This is why I dislike the fact that it removes simple methods for checking if values are NaN, for example. I do not find it ergonomic to disable these checks.