News for hackers. Stuff that matters.
Re:Beware of Fast-Math by jcranmer on Saturday May 31, 2025 @02:20PM (#44146031)
To get the right answers for accounting, all you have to do is pay attention to how you're doing rounding, which is no harder for floating-point than it is for fixed-point. Actually, it might be slightly easier for floating-point, since you're probably not as likely to skip over the part of the contract that tells you what the rounding rules you have to follow are.
Re:Beware of Fast-Math by munch117 on Saturday May 31, 2025 @02:38PM (#44146156)
Agreed. To do accounting, you need to employ some kind of discipline to ensure that you get rounding right. So many people erroneously believe that such a discipline has to be based on fixed point or decimal floating point numbers. But binary floating point can work just fine.