[Python-Dev] Re: Comparing heterogeneous types

Scott David Daniels Scott.Daniels at Acm.Org
Wed Jun 23 13:02:49 EDT 2004


Chermside, Michael wrote:
 > ... [a generally great explanation] ...
> All right, those who ACTUALLY understand this stuff (rather
> than having learned it from this newsgroup) can go ahead and
> correct me now.

You missed the killer example, subtraction:
Compare
     2.34x10^4 - 2.34x10^4
and
     2.34x10^40 - 2.34x10^40

These are obviously the same value in exact-mode, but no ranged
system should treat them identically.  Addition/subtraction is
_more_ problematic than multiplication/division in error range stuff.

You could even use
     2.35x10^4 - 2.34x10^4
but I find the zeros more dramatic.

- Scott David Daniels
Scott.Daniels at Acm.Org




More information about the Python-Dev mailing list