On 2020-09-06 13:33, Paul Gilmartin wrote:
On Sat, 5 Sep 2020 08:13:42 +1000, Robin Vowels wrote:
As for writing formulas, I prefer to follow a well-known formula,
thus:
volume = 4/3 * 3.14159 * radius**3
Beware! Than might left-associate as:
volume = ( 4/3 ) * 3.14159 * radius**3
... and the quotient of integers, 4/3, is 1.
No it's not. 4/3 yields 1.33333333333333.. to 15 digits in PL/I.
You're thinking of FORTRAN.
However, if I'm interested in efficiency, I'd prefer
volume = 4 * 3.14159E0 / 3 * radius**3
... (and correct.)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN