DoubleDouble.jl
DoubleDouble.jl copied to clipboard
compare with Bailey package
The most popular implementation of this sort of thing seems to be Bailey's QD package (which also includes double-double arithmetic).
Would be good to do some comparison with that package in terms of performance, accuracy, etcetera, to see how this Julia package compares, in order to have some confidence in this implementation.
See also this paper for a good review of the state of the art.
Thanks for the reference: I've had a quick read, and it seems that all of the basic double-double arithmetic algorithms are the same (indeed, if you chase the references back, most seem to return to the Dekker paper).
My main aim was to solve the two problems I mentioned in the readme, so I wasn't actually planning on doing that much more with this (at least not in the immediate future), but I'm more than happy to accept contributions.
I agree the comparison would be useful, however I don't have any experience wrapping binary packages (and I don't really have time to learn at the moment...)
The documentation from CRlibm also provides details for some more specialised algorithms (e.g. mul122
) that could be useful.
On the subject of QD, I was recently burned by not having used the packages fixes for x86's internal 80-bit rounding (fpu_fix_start
and fpu_fix_end
, see https://github.com/scibuilder/QD/blob/a5dbb6136ac1739e7e6955bf7b0c0fa05f3b2cbd/src/fpu.cpp), as said rounding only seems to effect a modest subset of current Intel machines. Does DoubleDouble.jl
have an equivalent means of setting the internal rounding mode?
We don't do anything specifically, but as AFAIK, Julia only uses correctly rounded results (i.e. no x87 intermediate precision), so this shouldn't be a problem. We should get some tests though.
Were you using gcc on a 32bit machine by chance?
I have only run into the issue on a student's Ubuntu VM running on a Windows machine with an Intel Core i7, and, even then, the behavior was sporadic (e.g., the behavior was fine if compiled with gcc but not if compiled with mpicc).