[petsc-dev] NaN constant?

Barry Smith bsmith at mcs.anl.gov
Wed Oct 28 11:21:25 CDT 2015


  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.

  Barry

> On Oct 28, 2015, at 11:04 AM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>  There is no portable way that I am aware of in C89 to generate a NaN.
> 
> Fortunately, we've had C99 for 16 years.
> 
> #include <math.h>
> 
>  NAN

  Way to name space?

> 
> 
> Is there any architecture where this isn't supported?




More information about the petsc-dev mailing list