[PYTHON MATRIX-SIG] Handling null data points

Andrew P. Mullhaupt amullhau@ix.netcom.com
Wed, 08 Jan 1997 23:23:44 -0500


Konrad Hinsen wrote:
> 
> NaN is part of the IEEE float format specification, so it wouldn't be
> available for anything but floats. There's also infinity (positive
> and negative) as a special value. But it is somewhat risky to use
> them as "no data" identifiers because some functions return them
> as error indicators (e.g. sqrt(-1) is NaN). You would never know
> whether a certain data item is unknown or the result of an undefined
> operation.

This is true, as far as it goes. But in languages which provide access
to the IEEE special values provides the possibility of a graceful
implementation of a "NA" value. In languages where there is extensive
experience with overloading "NA" and "NaN" there does not seem to be
much in the way of downside, especially since properly constructed
numerical routines normally do not rely on how floating exceptions are
handled, except for the use of denormals.

In S, where a NaN representation is used for "NA" most users would be
very upset if someone tried to take away the convenienve of "NA".

Later,
Andrew Mullhaupt

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

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