|
Boost : |
From: Paul A. Bristow (boost_at_[hidden])
Date: 2001-09-09 15:48:35
This useful summary table gives for C++ double
7FF8000000000000
to
7FFFFFFFFFFFFFFF
as the range of quiet NaNs, so any number with
the top 7FF8 bits all set is indeed a NaN and
indeterminate - which is what I am trying to check for.
MSVC std::numeric_limits<double>::quite_NaN gives
double quiet NaN -1.#IND == fff8 0000 0000 0000.
Is testing for the FFF8 part portable?
Thanks
Paul
> -----Original Message-----
> From: Swatosh, Joe R NWP [mailto:joe.r.swatosh_at_[hidden]]
> Sent: Thursday, September 06, 2001 4:54 PM
> To: 'boost_at_[hidden]'
> Subject: RE: [boost] Math Functions
>
>
>
> > -----Original Message-----
> >
> > Or an I doing something silly?
> >
> > HOwever, I can compare in hex (double quiet NaN -1.#IND ==
> > fff8 0000 0000
> > 0000) using a union
> >
>
> When we were struggling with some of these issues in MSVC I found
> this page
> http://babbage.cs.qc.edu/courses/cs341/IEEE-754references.html.
>
> According to the table at the bottom, fff8 0000 0000 0000 is not
> a NaN, but
> "Indeterminate."
>
> Hope that helps.
>
> Joe Swatosh | mailto:Joe.R.Swatosh_at_[hidden]
> nLink contract employee | mailto:jswatosh_at_[hidden]
> US Army Corps of Engineers | Northwestern Division, Portland District
> CENWP-HDC-P | Hydroelectric Design Center
> 220 NW 8th Ave | v:(503) 808-4032
> Portland, OR 97209 | f:(503) 808-4029
>
> Info: http://www.boost.org Unsubscribe:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk