8 ms·
The problem is not that computers are bad are math (they are arguably perfect at doing math for the operations definition they are given), it is that we think t
by nestorD 5y ago
The problem is not that computers are bad are math (they are arguably perfect at doing math for the operations definition they are given), it is that we think that we are using real numbers and the associated operations when we are using IEEE-754 floating point numbers and the associated operations.
IEEE-754 is actually quitte good at what it does (fast computations, on numbers covering a wide range, while staying accurate accross a large number of operations despite being encoded in finite precision) but it is not real number and it might not be optimal for a given application (maybe you want perfect precision and don't care about speed, maybe you want speed and don't care that much about the result: IEEE-754 is somewhere in the middle, used by people who care enough about speed to run their code on supercomputers and want precision good enough to predict whether their plane will fly given the simulation results).
- Veedrac 5y agoMore precisely, floats are a subset of the reals, plus infinities and NaNs. The bulk do represent real numbers, just a choice finite quantity of them.
- rcxdude 5y agoThe main key being the operations on them do not represent the same operations on the reals: adding two floats (both real) gives you another float (which is also real), but doesn't necessarily give you the same result as adding two reals.