[PYTHON MATRIX-SIG] floating point handling

Guido van Rossum guido@CNRI.Reston.VA.US
Fri, 03 Nov 1995 08:20:58 -0500

> It seems quite sensible to me that python should allow both modes of
> operation, i.e. IEEE extended arithmetic or exceptions. And if that
> means significant changes to the base language, I have to apologise to
> Guido for creating work. The problem for me is that python is a much
> better programming language than S-Plus or Matlab but that I need this
> matrix/tensor class to be as like them as possible before I switch to
> using it instead of them for my research.

If you insist on having "Inf" for infinity and "NaN" for 1/0, all you
probably need to do is hack the floatobject.c module a wee bit, to
include representations for them and to return them in appropriate
cases.  I don't mind work but I have about 1,000,000 different
projects to attend to (two of them are due today :-) and things go
faster if people contribute patches instead of requesating changes.

(Not that a contributed patch will automatically end up in the
language -- that depends on the quality of the code and how well your
feel for what's "right" in Python agrees with mine...)

--Guido van Rossum <guido@CNRI.Reston.VA.US>
URL: <http://www.python.org/~guido/>

MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org