4 ms·
You are right. For money, floating point computations are entirely inappropriate, but not because floating point is (supposedly) a "mess", but because floating
by reikonomusha 13y ago
You are right. For money, floating point computations are entirely inappropriate, but not because floating point is (supposedly) a "mess", but because floating point sacrifices uniform quantization for an exponential range of representable values.
The IEEE-754 standard is not a mess. It is complicated, because it has to be. Extreme care and precision must be taken when talking about mathematical quantities which are neither closed nor associative under the provided operations.
I challenge anyone else to make a concrete standard which supports accurate transcendental operations with numbers which range from 0 to 10^300 while remaining simple and easy to understand.
- nolite 13y agodid you not read the parent threads?
- reikonomusha 13y agoYes, I read them. And I am hearing that floats are "inaccurate", "a mess", and so on. I am not advocating their use to represent currency whatsoever, but the reasons are not because of the above, but rather the reason that I described.