On 20 February 2012 10:44, Dr. Alexander Klein
<alexander.kl...@math.uni-giessen.de> wrote:
> Don't we have the special NA-NaNs to mark data as missing instead of
> the usual NaNs?

Yes, they are just another NaN with a special bit pattern (any bit
pattern that has all of the exponent bits lit and a nonzero mantissa
is a NaN). I think almost everything in Octave treats them like just
another NaN, though. Perhaps we should be using this special bit
pattern to skip NA values, but it's tricky. For example, according to
the IEEE 754 standard , addition with NaNs need not be commutative,
therefore NaN + NA = NA but NA + NaN = NaN.

I'm not sure if this is the correct behaviour. Quoting the IEEE 754
standard:

     If the trailing significand field of a decimal input NaN is
     canonical then the bit pattern of that field shall be preserved
     if that NaN is chosen as the result NaN.

It sounds to me like we have chosen a canonical NaN value, NA, so we
should be preserving it across operations?

I'm not sure what the correct solution is here, but perhas we should
implement NA-skipping behaviour in the functions that Alois overwrote.

- Jordi G. H.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to