From: Don Higgins <[email protected]> Date: Saturday, 26 March 2011 21:05
>Several times in this discussion, it has been implied that using the right >langauge for floating point operations would prevent problems. I would >like to point out that regardless of the language and particular floating >point format you choose such as HFP, BFP, or DFP, there will always be the >opportuntiy for errors to creep into floating point caculations due to the >fact that when two numbers are added, subtracted, multiplied, or divided >the result stored in a floating point format may round or truncate the >result to a finite value which is different from the actual result which >may be an irrational number in a given base such as 1/3 in base 2 or 10. I mentioned IBM's PL/I, which provides traditional mainframe floating-point on Windows. It's also the same compiler, so results on either platform would be identical, given the same compiler options. I should also point out that PL/I's floating-point arithmetic is not subject to arbitrary rounding-off rules. Rounding-off is never applied in a floating-point calculation* unless explicitly requested in the PL/I source, and even in that case, round-off is strictly defined. __________ * Rounding is applied on decimal output.
