A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-October/029449.html below:

PEP239 (Rational Numbers) Reference Implementation and new issues

[Python-Dev] Re: PEP239 (Rational Numbers) Reference Implementation and new issues [Python-Dev] Re: PEP239 (Rational Numbers) Reference Implementation and new issuesTim Peters tim.one@comcast.net
Wed, 09 Oct 2002 16:34:06 -0400
[Christopher A. Craig]
> I agree.  I initially thought about returning a decimal with str(),
> but for that reason chose not to.

I expect you'll have to in the end, though.  Getting an explicit ratio of
multi-thousand digit integers really does suck for a default ...

> It might be nice to have a method that returned the best floating point
> decimal approximation to within n decimal digits or shorter, but I don't
> want a builtin to make an arbitrary decision on where to cut off
> precision.

If you haven't yet, you should strive to understand Moshe Zadka's prototype
rational implementation in Python CVS nondist/sandbox/ (which has all the
approximation functions you could need).  Unfortunately, the SourceForge
Python Numerics list:

    https://sourceforge.net/mailarchive/forum.php?forum_id=2280

appears to have lost almost all the voluminous discussions that went into
that, retaining mostly a random sampling of spam.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4