RE: [F&O] NaNs in avg, max, min, sum

Thank you for your comment.  This was discussed by the WGs on 9/15/2003
as part or a larger discussion about the behaviour of the aggregate
functions.  
A number of changes were proposed and accepted including the semantic
you recommended.  If the sequence that is passed to any of the aggregate
functions contains one or more NaNs, the result is NaN.

All the best, Ashok

> -----Original Message-----
> From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> request@w3.org] On Behalf Of Oliver Becker
> Sent: Thursday, June 19, 2003 3:20 AM
> To: public-qt-comments@w3.org
> Subject: [F&O] NaNs in avg, max, min, sum
> 
> 
> Hello,
> 
> the specifications for fn:avg, fn:max, fn:min, and fn:sum don't say
what
> all of these functions return if the argument is a sequence containing
> only NaNs.
> 
> Either the specification must define, that if after discarding these
> NaNs no other values remain (i.e. an empty sequence) then the empty
> sequence is returned. (Short "If $srcval contains exclusively NaN
values
> then the empty sequence is returned.")
> Or the whole discarding rule is dropped (I noted already a
compatibility
> problem for fn:sum), and the definitions have to be rephrased properly
> (e.g. for fn:min "... the item in $srcval whose value is not greater
than
> the value of every other item ..."),
> thus, if a NaN value is in $srcval then the result is NaN.
> 
> Regards,
> Oliver
> 
> /-------------------------------------------------------------------\
> |  ob|do        Dipl.Inf. Oliver Becker                             |
> |  --+--        E-Mail: obecker@informatik.hu-berlin.de             |
> |  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
> \-------------------------------------------------------------------/
> 

Received on Tuesday, 30 September 2003 18:10:13 UTC