[xquery-talk] Literal NaN

David Lee dlee at calldei.com
Mon Feb 28 10:47:14 PST 2011


not(boolean(number(0)))   -> TRUE


----------------------------------------
David A. Lee
dlee at calldei.com
http://www.xmlsh.org


-----Original Message-----
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Andrew Welch
Sent: Monday, February 28, 2011 10:43 AM
To: David Lee
Cc: talk at x-query.com
Subject: Re: [xquery-talk] Literal NaN


2011/2/28 David Lee <dlee at calldei.com>:
> Micheal Kay says →
>
> You can construct it using xs:double('NaN') or xs:float('NaN')
> =========================
>
> But you still can’t compare it to another NaN (and get true).
> So what is the ‘best’ way to determine if a numeric is a NaN ?
> So far I’ve only found
>       xs:string(value) eq ‘NaN’
>
>       Ok this works, but I’d still vote for a
>
>        fn:isNaN()


not(boolean(number($num)))   ?


-- 
Andrew Welch
http://andrewjwelch.com

_______________________________________________
talk at x-query.com
http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list