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

> It is not a goal to define any sort of "fast-fp" or "loose-fp" (c.f. JSR 84: Floating Point Extensions).

(Comic villain sitting in his fast-math lair) Foiled yet again!




I've long since decided that my write up on floating point will be titled "Floating Point or: How I Learned to Start Worrying and Hate Fast-Math".


As a fellow practitioner of the demonic -ffast-math arts, let us cackle menacingly together. :)


Did you mean -fbroken-and-not-necessarily-fast-math? [1]

[1] But really, if -ffast-math does turn -funsafe-math-optimizations on, it should have been named similarly. There is a possibility of much safer -ffast-math with almost zero breakage (by assuming a subset of IEEE 754, like the fixed rounding mode). The current -ffast-math is so reckless [2].

[2] https://simonbyrne.github.io/notes/fastmath/#flushing_subnor...


I find that -ffast-math is not so bad, so long as I develop and test with it from the beginning. It's much like any of the other more aggressive optimizations in that sense.

Plus, comparing against strict math as I go tends to highlight where I might have been about to do something dodgy anyway.




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

Search: