Barry Smith <[email protected]> writes:

>   I don't want to be in the business of providing NaNs. They are nasty little 
> beasts. PETSc should allow users to use NaN but should not enable them.

FP non-normal values are also extremely slow on some architectures so
it's a bad portability move to use them to identify missing values.  (Or
maybe future hardware will embrace in-band missing values and make sure
NaN is fast.)  In any case, signaling NaN is extremely useful for
debugging.

>> Fortunately, we've had C99 for 16 years.
>> 
>> #include <math.h>
>> 
>>  NAN
>
>   Way to name space?

Yeah, it should be M_NAN.  It'd be interesting to hear the rationale for
plain NAN; I would assume some vendor started using it and a bunch of
others adopted it, so the standard was just acknowledging the status
quo.

Attachment: signature.asc
Description: PGP signature

Reply via email to