|
> But even allowing for the inaccuracy of floating-point > the fact the releases 440 to 510 give result of > 1152921504606846976 and 520 gives > 1152921504606846980 suggests a change in > rounding during conversion to decimal. > Has anyone tried the example on 520 in a language > other than RPG IV to see if the behaviour is with > RPG or the machine? V5R2M0 - C: printf("%f\n", pow(16,15)); 1152921504606847000.000000 printf("%f\n", (pow(16,14)*16)); 1152921504606847000.000000 ReXX: numeric digits 31 say 16**15 1152921504606846976 say ((16**14) * 16) 1152921504606846976 numeric digits 16 say ((16**14) * 16) 1.152921504606847E+18 --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.