[SciPy-dev] Exact calculation
Skip Montanaro
skip at pobox.com
Fri Nov 1 08:25:34 CST 2002
Travis> What is the feeling of this group about adding some kind of
Travis> exact real number calculation module to scipy.
It's probably worth noting that there is a move afoot to include rational
numbers in Python. You might want to skim the recent discussion on
python-dev:
http://mail.python.org/pipermail/python-dev/2002-October/029051.htm
Also, the monthly summary:
http://mail.python.org/pipermail/python-dev/2002-October/thread.html
should get you to any separate threads that got disconnected from the
original thread. Search for "Rational Numbers". Of course, you will
probably want to read PEPs 239 and 240 as well:
http://www.python.org/peps/pep-0239.html
http://www.python.org/peps/pep-0240.html
As I recall, the concensus from the recent discussion seemed to be that
rational numbers will get accepted with syntactic sugar to follow later. I
think a trailing 'r' seems to be the most likely syntactic specifier (unlike
what was proposed in PEP 240). That would make "1r/3r", "1/3r" and "1r/3"
all rational numbers representing 1/3. I don't recall if "0.33333r" would
be valid as a rational representing a close approximation to 1/3 or not.
Skip
More information about the Scipy-dev
mailing list