News for hackers. Stuff that matters.
Re:0.30000000000000004 by umanwizard on Monday December 02, 2019 @06:15PM (#21688146)
> Storing money in floating point is fine. Just round to the nearest atomic unit when displaying.

Well, it's not just a display issue. In accounting, associativity and commutativity are important. People do care that `a + b + c - a == c + b` should evaluate to “true”.

Re:0.30000000000000004 by pushrax on Tuesday December 03, 2019 @02:27AM (#21690574)
It appears you did not see the critical point in the above comment. "Performing arithmetic operations against money in floating point is the dangerous part, as error can accumulate beyond an atomic unit."
Re:0.30000000000000004 by umanwizard on Tuesday December 03, 2019 @02:16PM (#21695585)
You’re right, I missed that. If you’re not going to do any arithmetic, you might as well store them as strings.