News for hackers. Stuff that matters.
Re:0.30000000000000004 by protonfish on Sunday April 02, 2017 @03:36PM (#14018611)
Using tricks to make numbers total what you think they "should" other than using rounding to proper amount of precision is lazy and deceitful.
Re:0.30000000000000004 by benjoffe on Sunday April 02, 2017 @08:57PM (#14019933)
Depends on the application of this, i.e. whether the total is more important or the individual values are more important.

Example: You're filling out a timesheet for a contracting job, and you worked 8 hours on several different tasks for your client, but your client's software rounds things to the nearest hour, then it would make sense to use an algorithm like this if your pay was going to be determined by this data entry. If your pay was not determined by this data entry then it may make sense to just round normally.