Hacker News new | past | comments | ask | show | jobs | submit login

> I'd wager that for the majority of programs written, the fast math is as good as the accurate math.

I'd take that wager. I spent 13 years working on video games and video game technology, a domain where floating point performance is critical, and by and large we never used fast-math because of the problems it created for us.




This is surprising to me! Can you explain what problems you encountered? My (limited) understanding is that the main effect of fast-math is to turn off support for subnormals. Since subnormals are only used to represent extremely small values, I wouldn't expect them to have much effect in the real world.


fast-math can result in many things you may not expect, e.g. treating FP operations as being associative and distributive, which they aren’t.


Sure but when does that matter in video game math?


Happy to take that wager, because the majority of programs written are not video games related :-)


I’m more curious about how it caused problems for you if you ever used it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: