News for hackers. Stuff that matters.
Re:Why does 0.1 and 0.2 = 0.30000000000000004? by tremon on Wednesday February 08, 2023 @03:42PM (#34714736)
Decimals are notoriously hairy to implement

Only floating-point decimal is hairy. Fixed-point decimal is hardly more difficult than integer math.

Re:Why does 0.1 and 0.2 = 0.30000000000000004? by t8sr on Wednesday February 08, 2023 @04:00PM (#34715057)
If you simply look at any of the real world implementations, you'll see it's not so easy. Rust has a few readable and educational crates that implement decimals, if you want to take a look.