[petsc-dev] how to handle PetscPrintf() of __float128 numbers

Barry Smith bsmith at mcs.anl.gov
Tue Dec 24 19:14:40 CST 2013


  http://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html  it states

  "On some targets when supported by the C library hooks are installed for printf family of functions, so that printf ("%Qe", 1.2Q); etc. works too."

  Does anyone know of systems where %Qg actually works all the time?

  When I run on petsc.mcs.anl.gov sometimes reasonable numbers are printed and but usually not. 

  I’m inclined to discard the %G business in PETScPrintf completely and require always casting PetscReal to (double) in print statements because I am sick of the crazy numbers. 

   Does anyone have a better way?

   Thanks

    Barry






More information about the petsc-dev mailing list