How not to write a loop

Ray Dunn ray at micomvax.UUCP
Sat Mar 19 08:44:55 AEST 1988


In article <7409 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn) writes:
>
>This is of course wrong.  Floating-point imprecision is not due
>simply to float<->double conversion, but is inherent in the
>whole approach.

Yup.  Interestingly, this is one of the very first things I can remember
being taught in "computer science" - NEVER test "reals" against absolute
values - choose a precision and test against values +/- that precision.

Mind you, that was in "autocoder", on a Ferranti Sirius, and the year was
1964.

Ah well,  yawn....

Ray Dunn.  ..{philabs, mnetor, musocs}!micomvax!ray



More information about the Comp.lang.c mailing list