▲ | kccqzy 2 days ago | |||||||||||||||||||||||||||||||||||||
That's not a useful way to think. Floating point numbers are just floating point numbers. You aren't approximating floating point numbers. You are approximating real numbers. Floating point numbers are compared against fixed point numbers where the point (the part between the integer part and fractional part) is fixed. That is why they are called floating. The nature of the real numbers is such that they can in general only be approximated, regardless of whether you use fixed point numbers or floating point numbers or a fancier computable number representation. | ||||||||||||||||||||||||||||||||||||||
▲ | ogogmad 2 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
The real numbers can be "represented" and "computed with" without needing approximations. The result is that there are no rounding errors. But it's not popular, and not necessarily worth the tradeoffs. On the other hand, see the Android calculator. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
▲ | AtlasBarfed 2 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
So what you're saying is I can use floating point math in most computer languages for financial calculations? Because anyone who's had any experience knows you absolutely can't. I am explicitly excluding big decimal type functionality here. What we are talking about explicitly are floats and doubles. | ||||||||||||||||||||||||||||||||||||||
|