2 ms·
Not just computer scientists. I think normal people are used to dealing with discrete data. Ask a person on the street to name some numbers and they'll almost
by madcaptenor 17y ago
Not just computer scientists. I think normal people are used to dealing with discrete data. Ask a person on the street to name some numbers and they'll almost certainly give you integers.
Also, I'm not a programmer, I'm a mathematician. Is the "right" way to do currency math do to integer arithmetic on prices expressed in cents (or, more generally, the smallest subdivision of the currency)?
- bena 17y agoAn integer expressing dollars, cents, or hundredths of a cent depending on the level of precision you need is the usual best practice. Using floating point math for money is just asking for trouble.