News for hackers. Stuff that matters.
Re:Std: Clamp generates less efficient assembly than std:min... by rwmj on Tuesday January 16, 2024 @09:31AM (#39013622)
It isn't just that. -ffast-math also allows the compiler to ignore infinites. In fact for GCC with -ffast-math, isinf always returns false. Something similar happens for NaNs/isnan.
Re:Std: Clamp generates less efficient assembly than std:min... by cogman10 on Tuesday January 16, 2024 @10:42AM (#39014544)
I lump this into "floating points are tricky". NaNs and inf are definitely legitimate floating point values. They are also things that a lot of applications will break on they ever encounter them.