News for hackers. Stuff that matters.
Re:0.30000000000000004 by epse on Monday December 02, 2019 @05:32PM (#21687804)
It's not correct, but in many cases it's plenty accurate
Re:0.30000000000000004 by jsjohnst on Monday December 02, 2019 @06:05PM (#21688042)
If you are dealing with other people’s money, the only accurate is accurate. Close enough should not be in any financial engineer’s mindset, imho.
Re:0.30000000000000004 by recursive on Monday December 02, 2019 @06:13PM (#21688137)
In this case, it's both. Decimal floating point types do not lose precision with base-10 numbers, unless using trig, square roots, arbitrary division and the like.
Re:0.30000000000000004 by jsjohnst on Monday December 02, 2019 @06:25PM (#21688237)
> arbitrary division

Like commonly happens doing financial calculations, especially doing interest calculations.