code not true?

David C. Ullrich ullrich at math.okstate.edu
Sun Apr 23 14:02:33 EDT 2000


On Sun, 23 Apr 2000 09:47:00 +0300 (IDT), Moshe Zadka
<moshez at math.huji.ac.il> wrote:

>On Sun, 23 Apr 2000, Kragen Sitaker wrote:
>
>> How many decimal digits are needed to make sure that 3 * (1/3) is
>> indistinguishable from 1?
>
>moshe-bombei:/home/moshe>python
>Python 1.5.2 (#1, Feb 21 2000, 14:52:33)  [GCC 2.95.2 19991024 (release)]
>on sunos5
>Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>>> (1.0/3)*3 == 1
>1
>
>
>Less then 17

	Aha. And now how many digits do we need for
x=1.0/3 to ensure that all calculations we do in the
future with x will come out right?

DU




More information about the Python-list mailing list