[petsc-dev] Ugly feature of __float128
Barry Smith
bsmith at mcs.anl.gov
Wed Oct 28 17:30:35 CDT 2015
After wasting hours debugging I just realized that gcc __float128 REQUIRES that numerical constants be written with a q suffix or first they are treated as double and then converted to __float. This means unless the numbers are nice binary numbers they are only as accurate as double precision. For example .1 - .1q = roughly 1.e-18.
I cannot understand why this is done this way. Who wants to convert a code to __float128 and have to then label all floating point numbers with a q which of course also means the code is not compilable with other compilers in double.
Barry
More information about the petsc-dev
mailing list