[petsc-dev] fortran literals
Munson, Todd
tmunson at mcs.anl.gov
Thu Sep 1 22:48:13 CDT 2016
The TS constants are weird in the code. Some of have enough digits for double,
some for quad, and some for quad double. I suspect mathematica output some
of the constants.
Todd.
> On Sep 1, 2016, at 10:29 PM, Jed Brown <jed at jedbrown.org> wrote:
>
> "Munson, Todd" <tmunson at mcs.anl.gov> writes:
>> Any idea how to do the same thing in C?
>
> #define PetscRealLiteral(x) (x ## q)
>
> PetscReal a = PetscRealLiteral(0.7);
>
>
> Seems like we should do that for the precomputed methods in TS.
> Actually, it would be better to do all the setup arithmetic in the most
> accurate supported type. Unfortunately, those methods are often
> computed using tools that only support double precision or are taken
> From papers that only report that many digits.
More information about the petsc-dev
mailing list