NegNan doesn't exist, except as a fluke of the representation (see link for how they are represented). A -NaN is the same as a NaN. They both fail all comparison tests, even NaN == NaN is false (unless your compiler optimizes the comparison out). Only difference is the way they are stringified, which should be "NaN", but stringification of NaN is non-standard. Solaris compilers will print "-NaN", but gcc only prints "nan". Microsoft compiler prints strange stuff.
Ron Blaschke <[EMAIL PROTECTED]> did some work in stringifying these things, see [perl #38887] http://en.wikipedia.org/wiki/IEEE_754 To summarize, if all the exponential bits are set, you get one of these odd ducks. If the mantissa is zero, then you get +/- Inf, based on the sign bit. If the mantissa is non-zero, you get a NaN, obviously there's lots of ways ot make NaN's (if the sign bit is set, Solaris prints -NaN). Fortunately, this is something you can rely on across architectures. Only thing is you need to know wheather it's big or little-endian. The signaling NaN vs the non-signaling is architecture dependent, the following link discusses AMD and Intel http://en.wikipedia.org/wiki/NaN It seems like you shouldn't need PMC for this, just the N-thingy (sorry my parrot is rusty). That is, these guys can be represented purely by floats or doubles -- unless, of course, we're supporting non-ieee-754 machine architecture. On 7/31/06, Nicholas Clark <[EMAIL PROTECTED]> wrote:
On Sun, Jul 30, 2006 at 10:45:29PM -0700, jerry gay wrote: > don't forget about negative-not-a-number, and the quiet (or signaling) Ah yes. that oxymoron. I've never yet seen the reasons for why it exists at all. Does anyone have a URL? Nicholas Clark
-- Bill Coffman ~~~_\\\|/ ~~~-(@ @) =oOO=(_)==OOo===