Here are some timings of quaddouble vs mpfr. All test were ran on
sage.math. In short: quaddouble is faster than M=mpfr at 212 bits of
precision on all functions special, except  on atanh() and asinh().

The format is as follows:
{{{
function:
quaddouble time
mprf time
}}}
Here are the timings:
cos:
0.0015869140625
0.00158500671387
sin:
0.00154900550842
0.00201201438904
tan:
0.00160002708435
0.00221610069275
acos
0.0053539276123
0.00785398483276
asin
0.00526189804077
0.00740694999695
atan
0.00495600700378
0.00740694999695
cosh
0.00159883499146
0.00189304351807
sinh
0.00158905982971
0.00194907188416
tanh
0.00168299674988
0.00202894210815
acosh
0.000118970870972
0.00012993812561
asinh
0.00462889671326
0.00277781486511
atanh
0.0044469833374
0.00309801101685
#####################

How accurate are these results? The error is quite small and more
accurate than computing with ieee doubles (most of the time, about 4
orders of magnitude). Here:
-- "mpfr vs qd " is the absolute error between a quad double and mpfr
real, and
-- "mpfr vs rd"  is the absolute error in between a real double and
mpfr real:

cos:
mpfr vs qd: 5.4180459105735642433E-17
mpfr vs rd: 3.57935903139e-13

sin:
mpfr vs qd : 4.9262450620608075647E-17
mpfr vs rd :4.22384349719e-13

tan:
mpfr vs qd : 1.0996009735470526760E-16
mpfr vs rd : 1.37401201528e-12

acos:
mpfr vs qd : 1.0587913940429450042E-16
mpfr vs rd : 1.95518601309e-12

asin:
mpfr vs qd : 8.8793698896573320837E-17
mpfr vs rd : 1.95532479097e-12

atan:
mpfr vs qd : 4.2348407244178416828E-17
mpfr vs rd : 4.09228206877e-13

cosh:
mpfr vs qd : 1.1001972366209892607E-16
mpfr vs rd : 4.91606755304e-13

sinh:
mpfr vs qd : 7.7307263905133232438E-17
mpfr vs rd : 6.54809539924e-13

tanh:
mpfr vs qd : 5.0901691104837936913E-17
mpfr vs rd : 4.08617584213e-13

cosh:
mpfr vs qd NAN
mpfr vs rd nan

sinh:
mpfr vs qd : 5.0731042379144584142E-17
mpfr vs rd : 4.23105994685e-13

tanh:
mpfr vs qd : 1.9007614867237325552E-16
mpfr vs rd : 8.84181616811e-12
######################

In conclusion:
In most cases it is faster to compute with quad double reals instead
of using mpfr reals at 212 bits. In all cases quad doubles are more
accurate than simple ieee doubles.

didier


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to