Re: [XQuery] NaN in numeric comparison (B.2 vs F&O 6.3.1-6.3.3)

Sarah,
Thanks for your helpful comment. The XML Query Working Group agrees with 
you and will modify the operator mapping table as you suggest in the next 
edition of the XPath 2.0 and XQuery 1.0 specifications.
Best regards,
--Don Chamberlin




swilkin@apple.com 
Sent by: public-qt-comments-request@w3.org
09/05/2004 04:56 PM

To
public-qt-comments@w3.org
cc
swilkin@apple.com
Subject
[XQuery] NaN in numeric comparison (B.2 vs F&O 6.3.1-6.3.3)







In appendix B.2 ge and le for numerics are defined as fn:not 
(op:numeric-less-than(A,B)) and 
fn:not(op:numeric-greater-than(A,B)). However, the F&O states in 
sections 6.3.1-6.3.3 that if 
NaN is A or B then the result is always false.

This leads to the falsity that NaN lt/gt anyNumeric = false, but NaN 
le/ge anyNumeric = true. 
The paragraph starting B.2 does mention to "see the description material 
in the main part of 
this document," but the NaN case is only mentioned in F&O.

Either a note could be added or A ge B (similarly for A le B) could be 
changed from 
fn:not(op:numeric-less-than(A,B) to
op:greater-than(A,B) or op:equal(A,B)

Thanks
--Sarah

Received on Tuesday, 12 October 2004 22:36:35 UTC