[Python-Dev] FP vs. tutorial

Tim Peters tim@digicool.com
Mon, 21 May 2001 17:57:22 -0400


Let's get some errors cleared up first:

+ FixedPoint is not in the distribution.

+ There is no PEP for Decimal.

+ Decimal f.p. is not more accurate than binary f.p.  In fact, it's
  provably worse (but not by much).

For the rest,

+ Yes, I'm serious about not including tutorial examples with
  platform-dependent output, unless they're explicitly meant to
  illustrate non-portable code.

+ Specific small examples notwithstanding, there is no uniformity
  across platforms in the last digit or so, because not even the IEEE-
  754 standard requires that (while C is much sloppier than 754), and
  vendors generally don't implement anything better than the minimum
  necessary when it comes to f.p. (Sun is a notable exception).

+ Happy to add text explaining the existence of surprises, and
  providing a URL.  Do the floating-point morons <wink> on Python-Dev
  find this one comprehensible?:

    http://www.lahey.com/float.htm