On Tue, 18 Jul 2006, Joerg Schilling wrote:

Keith M Wesolowski <[EMAIL PROTECTED]> wrote:

Your analogy is flawed.  NaN is a well-defined, valid floating-point
non-quantity.  If you were to take the address of such a value, the
[ ... ]
This is not a valid analogy.

While you may do string operation on "", NaN is "not a number", so you cannot
use it (which looks similar to what "referencing" is for strings).

You _can_ use it. Just func(NaN) == NaN. Transform/Access it in any way you like and it stays NaN. The (3M) manpages note this ...

Might not be very useful, but usable. Unlike *(NULL).

Btw, might be unrelated or a bug, but the log(3M) manpage claims log(-1.0) returns NaN, but I just tested that on my amd64 box and it doesn't - isnan(log(-1.0)) gives 0; is there anything special I need to turn on in the compiler (gcc and cc behave identical) to get this working ? Not an optimizer issue either, isnan(log(atof(argv[1]))) doesn't change the result. Bug ? I'm not into floating point things ...


FrankH.

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to