zlacker

[parent] [thread] 1 comments
1. Ashame+(OP)[view] [source] 2024-01-17 18:36:23
No; compilers have done this even without fast-math. Gcc does not seem to do this anymore, but still does plenty of unsafe optimizations by default, like FMA.

Or maybe the library you use...

replies(1): >>mabste+Eu4
2. mabste+Eu4[view] [source] 2024-01-18 22:37:14
>>Ashame+(OP)
Argh, sounds really frustrating! It's hard enough to get accuracy when you can control operations never mind when the compiler is doing magic behind the scenes!

FMAs were difficult. The Visual Studio compiler in particular didn't support purposeful FMAs for SSE instructions so you had to rely on the compiler to recognise and replace multiply-additions. Generally I want FMAs because they're more accurate but I want to control where they go.

[go to top]