W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2003

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

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Tue, 30 Sep 2003 15:09:50 -0700
Message-ID: <E5B814702B65CB4DA51644580E4853FB0AF48201@red-msg-12.redmond.corp.microsoft.com>
To: "Oliver Becker" <obecker@informatik.hu-berlin.de>, <public-qt-comments@w3.org>

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
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
> 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
> then the empty sequence is returned.")
> Or the whole discarding rule is dropped (I noted already a
> 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
> 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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:14 UTC