[Python-Dev] Minutes from the Numeric Coercion dev-day session

Paul Prescod paulp@ActiveState.com
Tue, 13 Mar 2001 03:45:21 -0800


Guido van Rossum wrote:
> 
>...
> 
> You know where I'm leaning...  I don't know that newbies are genuinely
> hurt by FP.  If we do it right, the naive ones will try 11.0/10.0, see
> that it prints 1.1, and be happy; the persistent ones will try
> 1.1**2-1.21, ask for an explanation, and get a introduction to
> floating point.  This *doesnt'* have to explain all the details, just
> the two facts that you can lose precision and that 1.1 isn't
> representable exactly in binary.  Only the latter should be new to
> them.

David Ascher suggested during the talk that comparisons of floats could
raise a warning unless you turned that warning off (which only
knowledgable people would do). I think that would go a long way to
helping them find and deal with serious floating point inaccuracies in
their code.

-- 
Python:
    Programming the way
    Guido
    indented it.
       - (originated with Skip Montanaro?)