EXPONENTIAL
NOTATION |

This is my article
Exponential notation (98/11/05) in
Archive of REXXLIST
Ian Collier´s reply
the subject Re: Exponential notation
(98/10/07) in
Archive of REXXLIST
In article Exponential notation
Vladimir Zabrodsky would have us change the rules for exponential notation
from:
"If the number of places needed before the decimal point exceeds DIGITS, or the number of places after the point exceeds twice DIGITS, exponential form will be used." to: "If the number of places needed before the decimal point exceeds DIGITS, or the number leading zeros after the point exceeds DIGITS and number of places after the point exceeds twice DIGITS, exponential form will be used."
There is no difference between these two statements. When you say:
0.00001234567890123456789 + 0
the first thing Rexx will do is chop off all those unnecessary digits,
leaving you with
0.00001235 (since numeric digits is 4). The second thing
it will do is use the above rule to determine whether to write the result
in exponential notation. There are only eight digits after the decimal
point, so exponential notation is not used.
Once the number has been rounded there can be at most DIGITS non-zero digits after the decimal point, so the first statement above implies the second. That is, if the number of places after the point exceeds twice DIGITS then at least DIGITS+1 of them must be zeros. |

last modified 26th April 2002

Copyright © 1998-2002 Vladimir Zabrodsky

Czech Republic

Copyright © 1998-2002 Vladimir Zabrodsky

Czech Republic