Boost logo

Boost :

From: Greg Chicares (chicares_at_[hidden])
Date: 2001-09-06 22:00:04


"Swatosh, Joe R NWP" wrote:
>
["Paul A. Bristow" wrote:]
> >
> > 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."

Or, as intel calls it, an "indefinite".

Paul--the '80x87' generally returns an indefinite when you've
masked a floating-point exception. You asked

> This is in debug mode - is this supposed to be strict IEEE conformance?
> (I've switched with /Op option on but this makes no difference).

I don't have msvc here to check, but I suspect that to get
strict ISO60559 conformance, you need to unmask all
exceptions. I know you have a function for this--I saw it
in one of your libraries once.

I ran into a similar-seeming problem once with another
compiler--borland, I think. By default, it raised a
hardware exception when I used a *quiet* NaN. The solution
to the problem was to fix the masks. Hope this helps.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk