[Python-Dev] Comparing heterogeneous types

Batista, Facundo FBatista at uniFON.com.ar
Thu Jun 24 11:51:52 EDT 2004


#- > I maintain that when comparing a long with a float
#- > where the exponent is larger than the precision, that the
#- > float should be treated as if it were EXACTLY EQUAL TO 
#- > <coefficient>*2^<exponent>, instead of trying to treat it as
#- > some sort of a range. Similarly, if we implemented a Rational
#- > type, I would suggest that instances of float (or of Facundo's
#- > Decimal) where <exponent> is LESS than the digits of
#- > <coefficient> should be treated as if they were EXACTLY EQUAL
#- > TO the corresponding fraction-over-a-power-of-two.

Don't get to understand this. Could you send please an example of Decimal to
this case?

Thank you!

.	Facundo



More information about the Python-Dev mailing list