News for hackers. Stuff that matters.
Re:Examples of Floating Point Problems by carapace on Friday January 13, 2023 @01:18PM (#34371690)
Floating point is a goofy hacky kludge.

> There's a reason why it's implemented in hardware in all modern computers

Yah, legacy.

The reason we used it originally is that computers were small and slow. Now that they're big and fast we could do without it, except that there is already so much hardware and software out there that it will never happen.

Re:Examples of Floating Point Problems by dahfizz on Friday January 13, 2023 @01:24PM (#34371789)
What replacement would you propose? They all have different tradeoffs.
Re:Examples of Floating Point Problems by carapace on Friday January 13, 2023 @01:30PM (#34371870)
(I just tried to delete my comment and couldn't because of your reply. Such is life.)

ogogmad made a much more constructive comment than mine: https://news.ycombinator.com/item?id=34370745

It really depends on your use case.

Re:Examples of Floating Point Problems by astrange on Friday January 13, 2023 @04:18PM (#34374005)
Turning all your fixed-size numeric types into variable-sized numeric types introduces some really exciting performance and security issues. (At least if you consider DoS security.)

I think fixed-point math is underrated though.