Hmmm
7 *-* NUMERIC DIGITS 11
>>> "11"
8 *-* say digits()
>>> "11"
11
9 *-* say 8947 * 8640000
>>> "77302080000"
77302080000
//Lasse
-----Ursprungligt meddelande-----
Från: IBM Mainframe Discussion List <[email protected]> För Charles Mills
Skickat: den 12 mars 2024 18:29
Till: [email protected]
Ämne: Rexx numeric digits and scientific notation question
In a Rexx program I start out by executing NUMERIC DIGITS 15 (and I have also
tried 11 and 13 and gotten the same result).
For 8947 * 8640000 I am getting a result of 7.73020800E+10 rather than the
desired 77302080000.
Is this to be expected? I interpret the Rexx documentation as saying that a
result is only converted to scientific notation when it exceeds NUMERIC DIGITS.
Where am I going wrong? Or more to the point, how do I get the desired result?
(Why do I care? I am subsequently going to add a relatively small number to the
product and don't want to lose low-order digits.)
I tried using FORMAT but unless I use it in every subsequent calculation Rexx
goes back to scientific notation and I lose low order digits.
Thanks,
Charles
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN