top | item 44839011

Floats Don't Work for Storing Cents

12 points| mattmarcus | 6 months ago |moderntreasury.com

2 comments

order

rhelz|6 months ago

My father showed me the assembly language for a minicomputer, and I can remember being puzzled why the computer--a binary machine--had instructions for decimal arithmetic.

He smiled and had me add $0.02 + $0.03. When I didn't get $0.05, I was enlightened :-) It was like a koan.

pestatije|6 months ago

because those are hundredths of a dollar, not cents