On 02/17/2012 05:19 PM, Jordi Gutiérrez Hermoso wrote: > 2012/2/17 Alois Schloegl<alois.schlo...@ist.ac.at>: >> On 02/17/2012 03:01 PM, Jordi Gutiérrez Hermoso wrote: >>> I went to read the IEEE 754 standard, and you're right, they do >>> explicitly say in section 6.2 >>> >>> Quiet NaNs should, by means left to the implementer’s discretion, >>> afford retrospective diagnostic information inherited from invalid >>> or unavailable data and results. >>> >>> so it's also meant for missing values. Huh, I was wrong. However, they >>> also go on to say, >>> >>> For an operation with quiet NaN inputs, other than maximum and >>> minimum operations, if a floating-point result is to be delivered >>> the result shall be a quiet NaN which should be one of the input >>> NaNs. >>> >>> so the NaN toolbox is in fact breaking the IEEE 754 standard, since it >>> does not return NaN for many operations that it should. >> >> >> The IEEE754 standard defines on unary and binary operations like >> +,-,*,/,<,>,<=,>=,==,<>,!; it does not talk about statistical >> functions. > Where are you seeing this? Section 5 seems to be defining operations, > and the passage I quoted above specifically thinks it's necessary to > refer to "maximum" and "minimum" as operations. I don't see the > standard referring to only binary operations. The way I read section > 5.1, an operation is anything that produces floating-point results. > Including sum(), mean(), and std().
Looking at the last public draft on http://www.validlab.com/754R/drafts/archive/2006-10-04.pdf, the first sentence on chapter "7. Operations" and "7.1 Overview" says "All conforming implementations of this standard shall provide the operations listed in this clause. ..." but the section does not list any statistical functions like mean(), std(). Instead of sum(), the standard defines addition and fused-multiply-add (FMA), but the the NaN-toolbox does not shadow the function sum() but defines its own sumskipnan() function. The users of the NaN-toolbox can choose the NaN-propagating function sum() or the NaN-skipping function sumskipnan(). So, the NaN-toolbox does not break the 754 standard. Alois ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev