[Python-Dev] Re: [Edu-sig] Rational Division
Eric S. Raymond
esr@thyrsus.com
Mon, 7 Feb 2000 01:54:16 -0500
Tim Peters <tim_one@email.msn.com>:
> Looks natural for Python! I'm not sure what "/" should *do* in the Brave
> New World, though. Floating-point has been the conventional answer so far,
> but I'd like to take another look at what Scheme does (not sure what the std
> sez, but every Scheme I've ever used treated integer division as returning a
> rational). The *prime* motivation here seems to be that "7/3" not lose
> catastrophic amounts of information silently; other clear choices are "lose
> none" (rationals) and "maybe lose a little in a way that's very hard to
> explain" (floating point).
I agree with you in preferring the "let's do rationals" answer. Seems
to me I recall one of the other points in the Alice presentation was that
non-techies find floating point obscure and think of simple fractions
as atoms.
--
<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>
The saddest life is that of a political aspirant under democracy. His
failure is ignominious and his success is disgraceful.
-- H.L. Mencken