[petsc-dev] default SNES rtol for single precision builds

Barry Smith bsmith at mcs.anl.gov
Tue Sep 20 08:16:06 CDT 2011


On Sep 20, 2011, at 8:13 AM, Jed Brown wrote:

> On Tue, Sep 20, 2011 at 15:05, Barry Smith <bsmith at mcs.anl.gov> wrote:
> By the way, it always seemed strange to me that PETSC_MACHINE_EPSILON (in double) is defined to be 1.e-14 instead of the actual IEEE value 1.11022e-16 (or 2.22045e-16). Its square root is 1.0537e-08.
> 
>   I'll fix this.
> 
> >
> > Also, it could be possible to set these values by calling Lapack's _lamch at configure.
> 
>   Yuck
> 
> This stuff is defined in float.h (and limits.h for integers). tfs.h includes this unconditionally (maybe it should check PETSC_HAVE_FLOAT_H, but it doesn't), so if we aren't seeing lots of hard build failures in that code, then it's really available everywhere (it was specified by C89, so this isn't too surprising).

  But they don't have the sqrt versions.

   Barry





More information about the petsc-dev mailing list