[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

-----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

talk at x-query.com

More information about the talk mailing list