News for hackers. Stuff that matters.
Re:Why does 0.1 and 0.2 = 0.30000000000000004? by mcv on Thursday February 09, 2023 @06:49AM (#34722584)
The problem is that fixed decimal types are far less standard in many programming languages. One thing I really loved about Groovy is that BigDecimal is the standard type for decimal numbers. Type `1.5` and you will have a BigDecimal rather than a float in your hands.

Not very suitable for complex scientific calculations of course, but perfect for web development which is more likely to deal with money than scientific calculations.

There are no comments on this comment yet.