Mail Archives: djgpp/2001/07/04/13:00:08
On Sat, 30 Jun 2001 16:31:09 +0300, "Eli Zaretskii"
<eliz AT is DOT elta DOT co DOT il> sat on a tribble, which squeaked:
>Yes, I understand. And that precisely is the sign of a numerical bug,
>in most cases I've seen.
I would think if the problem was numerical instability of the
algorithm, the problem would be *more* pronounced when using a *lower*
precision. The exception being comparing floating point quantities for
exact equality, which my code is not doing. (That would tend to seem
to "work" better with lower precision quantities, of course.)
>Numerical computations are tricky.
These ones aren't. They just add and multiply and subtract and
compare, and they only compare for exceeding certain (small)
magnitudes -- they don't depend on an exact comparison with anything,
ever. Last I checked, for it to be numerically unstable the
calculation has to be either calculating with really huge numbers, or
doing division. (The canonical example of matrix inversion involves
division, and that's where poor choices of algorithm exhibit
instability.)
--
Bill Gates: "No computer will ever need more than 640K of RAM." -- 1980
"There's nobody getting rich writing software that I know of." -- 1980
"This antitrust thing will blow over." -- 1998
Combine neo, an underscore, and one thousand sixty-one to make my hotmail addy.
- Raw text -