Newsgroups: | comp.parallel,comp.compilers |
From: | roedy@BIX.com (Roedy Green) |
Keywords: | arithmetic |
Organization: | Canadian Mind Products |
References: | <3aqv5k$e27@monalisa.usc.edu> <3b0q3g$i88@panix.com> |
Date: | Wed, 30 Nov 1994 06:21:44 GMT |
>The above code verges on inaccuracy by keeping an index variable as
>a floating point number and incrementing it by a floating point
>number. Systematic error is introduced into such an index variable if the
In general that is the case, especially when he constants 0.1 or 0.01 are
used to increment. However in IEEE floating point format, pure integers
add to give pure integers if they don't get too big. So the code shown
would work correctly on a machine with IEEE representation.
Roedy@bix.com
-30-
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.