PEP0238 lament

Martijn Faassen m.faassen at vet.uu.nl
Mon Jul 23 12:48:44 CEST 2001


Moshe Zadka <moshez at zadka.site.co.il> wrote:
> On Sun, 22 Jul 2001 16:27:32 -0700, David Eppstein <eppstein at ics.uci.edu> wrote:
>> My intuition is that the users who will be surprised that 1/2 = 0 are the 
>> same ones who would be bitten by roundoff-error bugs if 1/2 = 0.5.
>> Result: buggier code since the errors are less obvious.

> The thing is, making 1/2=0.5 won't make the problem *worse*. Because
> after two days of being baffled by 1/2=0, these newbies will eventually
> figure out the solution float(1)/2. So, I'm just getting to show them
> the buggy roundoff-error code *faster*, instead of making them suffer
> for it. You want to fix *that* problem, you have to give easy to access
> rationals.

Will you introduce a special 'rational division' operator for that? 
Or change the semantics of '/' again? :)

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list