DoubleDouble.jl icon indicating copy to clipboard operation
DoubleDouble.jl copied to clipboard

compare with Bailey package

Open stevengj opened this issue 11 years ago • 5 comments

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.

stevengj avatar Sep 27 '13 18:09 stevengj

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...)

simonbyrne avatar Sep 29 '13 11:09 simonbyrne

The documentation from CRlibm also provides details for some more specialised algorithms (e.g. mul122) that could be useful.

simonbyrne avatar Sep 30 '13 10:09 simonbyrne

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?

poulson avatar Jan 26 '16 19:01 poulson

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?

simonbyrne avatar Jan 26 '16 21:01 simonbyrne

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).

poulson avatar Jan 26 '16 21:01 poulson