Subject: Re: Problem and fix for systat/top/ps
To: None <port-vax@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-vax
Date: 03/14/2007 12:46:37
>> Neither do NaNs.  VAXen don't have NaNs.  The closest things the VAX
>> has to IEEE NaNs are reserved operands, [...]
> Hmm, you might be right.  How does IEEE units behave when an
> operation on a NaN is performed then?

If it's a signaling NaN, it traps.  (This is why I say VAX reserved
operands are roughly comparable to signaling NaNs.)  I think there are
rules for when the trap is noticed depending on some settings, but
that's a part of IEEE floating-point I've never really delved into.

If it's a quiet NaN, it depends.  Usually, the result is a quiet NaN,
but quiet NaNs disappear when you do things like multiply them by zero
or add them to infinity - basically, if the result of an operation
would be the same for all finite values, then using a (quiet) NaN
instead gets the same result; otherwise a quiet NaN results.

NaNs can be generated by doing things like 0/0 or +inf + -inf where the
result is undefined.  I think these generate quiet NaNs by default, but
this might be changeable - again, this is a part of IEEE arithmetic I
don't really know.

I don't know the rules - if there are any - for *which* quiet NaN is
produced when one is.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B