[PYTHON MATRIX-SIG] floating point handling

P.S.Craig@durham.ac.uk P.S.Craig@durham.ac.uk
Fri, 3 Nov 1995 09:38:16 +0000 (GMT)


P. Dubois writes:
> 
> 
> (1) I disagree with Konrad's remarks on floating point.
> 
> I know of no production code that allows the generation of NaNs or any
> of the other IEEE nonsense. If such a thing occurs in one of our codes 
> it is an error and we need to hear about it immediately. Knowing *where*
> the problem first occurred is crucial.
> 

This is getting a bit silly. Whether the IEEE `nonsense' is
appropriate or not is context dependent. I make heavy use of S-Plus (a
statistics package with some APL like matrix addressing) and Matlab (a
widely used matrix arithmetic package with many practical
applications). Both of these return Inf for 1/0 and Nan for 0/0 and I
don't think they have to generate exceptions to do it.

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.

Cheers,

Peter Craig




=================
MATRIX-SIG  - SIG on Matrix Math for Python

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