2 ms·
Who wouldn't want some fun, safe, math optimizations! I still don't think it's very descriptive though. Whether or not it's unsafe depends a lot on the domain.
by cozzyd 6y ago
Who wouldn't want some fun, safe, math optimizations!
I still don't think it's very descriptive though. Whether or not it's unsafe depends a lot on the domain. In most of my code, I don't care about the sign of zero or floating point associativity and want my compiler to auto convert division to multiplication by reciprocals. Better would be something like -fnon-compliant-float-math or something.
Although I guess -fno-trapping-math is a bit different from the other optimizations which could actually be "unsafe" in a different way, since signaling nans are quite useful for debugging.