[Matrix-SIG] Strange equal behavior

Yoon, Hoon (CICG - NY Program Trading) HYoon@exchange.ml.com
Wed, 7 Jul 1999 16:03:56 -0400


Hi,

  I think I pose this type of Q's little too often, but everytime I thought
I had good handle on this subject, I get this kinda screwy results. Has
anyone have fix for this? I am using LLNL distribution 11 on NT svc pack 3.
Before this I thought I had missings nearly tackled. :(
  Thanks in adv,

1.#QNAN is generated by C++ code:
#define ISMISSINGVAL(A)   ( (*((unsigned short *)(A)+3) & (unsigned
short)0x7FFF) > (unsigned short)0x7FF0 )
#define MKMISSINGVAL(A)   ( *((unsigned int *)(A)+1) = 0x7fffffff,
*((unsigned int *)(A)) = (unsigned int)0 )

C:\Python\AddPy>python
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from NumpyA import *
>>> NA
1.#QNAN
>>> equal(0,NA)
1
>>> z = 1e1000/1e1000
>>> z
-1.#IND
>>> equal(0,z)
1

**************************************************************
S. Hoon Yoon                   (Quant)                    Merrill Lynch
Equity Trading 
yelled@yahoo.com hoon@bigfoot.com(w)
"Miracle is always only few standard deviations away, but so is
catastrophe."
* Expressed opinions are often my own, but NOT my employer's.
"I feel like a fugitive from the law of averages."    Mauldin
**************************************************************