3 ms·
Thanks for the link. I think floats are pretty overused, I don't see fixed precision decimals getting used, which always struck me as odd.
by GhotiFish 13y ago
Thanks for the link. I think floats are pretty overused, I don't see fixed precision decimals getting used, which always struck me as odd.
- zokier 13y agoI'd love to see a language or even a library that would make no-surprise fixed point and/or arbitrary precision math first class citizens, like what Python did with integers.
- dlitz 13y agoPython has a decimal (as opposed to binary) floating-point library, which is great for doing math with inherently decimal quantities (e.g. money): http://docs.python.org/3.3/library/decimal.html http://docs.python.org/3.3/library/decimal.html
- whattssonn 13y agoCOBOL and RPG, for example, on Mainframe / Midrange systems have native support for fixed point (decimal) types. It's the second most used type, besides the "character" types. Floats are seldom used in the context of business applications. Fixed point math is even directly implemented in hardware on Power processors. Always been like that on IBM platforms.