Against PEP 240

Alex Martelli aleaxit at yahoo.com
Tue May 29 17:30:32 EDT 2001


"Paul Prescod" <paulp at ActiveState.com> wrote in message
news:mailman.991165483.26639.python-list at python.org...
    ...
> > If we're forced to use 'f' or 'F' I don't mind. We can do double
> > precision in the same way ie use 'D'.
>
> Wait a second. Are you saying that you don't mind if a 5.3 literal is
> interpreteted as rational as long as there is an easy way to get floats
> with 5.3f? I think everyone would agree that there should be an easy way
> to get at floats.

Sure!  Just as  long as it's not the default, I'd be happy:-).


> > Are complex numbers, floats and rationals and ints to be freely mixable?
>
> As far as I know. A float is an inexact (and high performance) rational

Careful there -- you do risk the wrath of Kahan and his cohorts.  "Inexact
result" is a specific IEEE 754 exception.  Yes, you CAN read in a zillion
texts and webpages such apparently-useful simplifications as "Floating
point numbers ... are inexact representations of ideal real numbers",
(http://cch.loria.fr/documentation/IEEE754/ for example), but Kahan
does place as #1 "Prevalent Misconception  about  Floating-Point" the
statement "Floating ­point numbers are all at least slightly uncertain",
and "inexact" and "uncertain" are too close for comfort...:-).


Alex







More information about the Python-list mailing list