3 ms·
> How should you handle currency? Cents, or fractions thereof, fit into an integer, unless you have to do currency conversion. If you have to do that, you hir
by Natsu 16y ago
> How should you handle currency?
Cents, or fractions thereof, fit into an integer, unless you have to do currency conversion.
If you have to do that, you hire a programmer who has studied numerical analysis. It's a fun course, but very hard. I remember studying with a textbook the professor himself wrote and not being able to find much information online. This has changed quite a bit in the past decade or so. Nowadays, you can find useful stuff like this online:
http://en.wikibooks.org/wiki/Real_Analysis http://en.wikibooks.org/wiki/Real_Analysis
http://floating-point-gui.de/ http://floating-point-gui.de/
http://docs.sun.com/source/806-3568/ncg_goldberg.html http://docs.sun.com/source/806-3568/ncg_goldberg.html