At 08:20 AM 1/4/2007, Terry Carroll wrote:
>On Wed, 3 Jan 2007, Dick Moores wrote:
>
> > Terry, I just noticed that farey(0.36, 10) returns (1, 3), a pretty
> > big miss, IMO. The correct fraction with smallest error and maximum
> > denominator of 10 is 3/8, which I'm proud to say my klunky frac.py
> > (<http://www.rcblue.com/Python/fracForWeb.py>) produces.
>
>Dick, good catch.  Consider adding a comment to the Cookbook page pointing
>out that the method sometimes does not produce the incorrect answer,
>including for that input.

Done.

Dick



_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to