
The sign is actually the one information of a NaN you don't want to get back. The IEEE-754 standard explicitly mandates that NaN do not have a sign (or more precisely, the sign of a NaN is not part of its payload).
All the other bits of a NaN value are important however. They are its payload and are supposed to be stable through arithmetic operations (except when an operation involves two NaNs). As a matter of fact, NaNs were conceived to carry information (debug information mainly).
At a time, there even were discussions on revising the IEEE-754 standard to describe a syntax like NaN0x3ff800. This proposal was withdrawn because it was so high-level, but it should give an idea on what NaNs were about.
Understood. Thanks for the information. The basic problem here is that there is no portably way to get at that information, frexp yields undefined behaviour if pass it a NaN for example :-( Likewise there is no portable way to create a NaN with a specific payload (that I'm aware of), not even in C99. John.