4 ms·
A spreadsheet would have prevented the author from using floating point to represent money.
by jbester 16y ago
A spreadsheet would have prevented the author from using floating point to represent money.
- jbl 16y agoWhat is the issue with using floating point to represent money?
- droz 16y agoget out.
- mquander 16y agoTime spent writing obvious reply: $2.50 Good faith deduction: ($1.00) Deduction for joke comment opportunity: ($1.50) Dear jbl, your invoice total is $0.00000027.
- jbl 16y agoAh. Right. Rounding errors and other floating point issues. Guess I should have my coffee before reading HN. headdesk
- hoop 16y agoFor the purposes of my example assignment, I am required to provide all answers rounded to the nearest dollar (hence the call to round().) For a one-off (or ten-off) series of calculations the use of floating point is a non-issue.