how fast is Python?

Andrew Dalke adalke at mindspring.com
Fri Aug 22 01:23:04 EDT 2003


Jeff Epler:
> As far as I can tell, your program would be computing a value on the
> order of 10^(3x10^31)...

>     for(int i = 0; i < 108; i++)
>        X = 1 + X * X;

He had 1-X*X.   Since X starts at 0.5, this will never go leave
the range 0 to 1.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list