Re:Std: Clamp generates less efficient assembly than std:min...
by gumby on Tuesday January 16, 2024 @09:57AM
(#39013922)
Higher precision isn’t always available. IEEE 754 is an unusually well-thought-through standard (thanks to some smart people with a lot of painful experience) and is pretty good at justifying its decisions, some of which are surprising (far from obvious) to anyone not steeped in it.
[ Parent
| on HN ]
Re:Std: Clamp generates less efficient assembly than std:min...
by cogman10 on Tuesday January 16, 2024 @10:46AM
(#39014619)
The main problem with floats in general is they are designed primarily for scientific computing.
We are fortunately starting to see newer (well, not that new now) CPU instructions like FMA that make more accurate decimal representations not take such huge performance hits.
Re:Std: Clamp generates less efficient assembly than std:min...
by adgjlsfhk1 on Tuesday January 16, 2024 @12:18PM
(#39015863)
what does fma have to do with decimal numbers?