5 ms·
Could make all the same arguments against integers: - Limited precision, - Some numbers aren't representable, - Go try adding 1 to itself over and over again.
by skj 13y ago
Could make all the same arguments against integers:
- Limited precision,
- Some numbers aren't representable,
- Go try adding 1 to itself over and over again.
That said, yes, floats are a bad idea for financial arithmetic.
- thaumasiotes 13y agoYou can make the same arguments against integers, but you'd need to be willfully blind to the context of the discussion. There are no monetary quantities that can't be represented as integers. Using a scheme that can't represent 1/3 to record numbers for which 1/3 is an illegal value doesn't present any practical or theoretical problems.
- skj 13y agoMy point was that the arguments presented were not the reasons that using floats to handle finance was a bad idea. Since, as I showed, they also applied to integers.
- ufo 13y agoSheesh, stop being so pedantic. Unlike computers, humans can infer extra meaning from the context around a sentence.