Following papers and source code for double-double arithmetic for some time, I still can't find out how exactly a dd_real ( defined as struct dd_real { double x[2];...}
) number is split into two doubles. Say if I initialize it with a string, dd_real pi = "3.14159265358979323846264338327950";
what will be pi.x[0]
and pi.xi[1]
? I need to understand it and then write a hopefully small Python function that does it.
The reason I don't just want to call into the QD library is that I'd prefer to reimplement the correct split in Python so that I send my 35-digit precision constants (given as strings) as double2
to CUDA code where it will be treated as double-double reals by the GQD library -- the only library, it seems, to deal with extended precision calculations in CUDA. That unfortunately rules out mpmath too, on Python side.
pi.x[0]
andpi.x[1]
), you won't be able to make any sense of the split with respect to the original decimal value. – Granulationdouble double
is in no way "arbitrary precision". It is only "more precision that IEEE 754 double precision, while taking advantage of the available double precision hardware". – Granulation