On Sat, Aug 22, 2009 at 1:21 PM, Fredrik Johansson <
fredrik.johans...@gmail.com> wrote:

>
> On Sat, Aug 22, 2009 at 9:50 PM, William Stein<wst...@gmail.com> wrote:
> > On my laptop (OS X 64-bit Sage-4.1.1 and Mathematica 7.0):
> >
> > Test 1 -- sage (=mpfr) wins
> >
> > SAGE:
> > sage: time a = N(pi, 5000000)
> > CPU times: user 10.31 s, sys: 0.94 s, total: 11.26 s
> > Wall time: 11.73 s
> >
> > MATHEMATICA:
> > In[1]:= Timing[N[Pi, 5000000]]][[1]]
> > Out[1]= 11.3116
>
> I think this is wrong; Sage's N counts bits by default while
> Mathematica's N counts digits.


You're right.  Thanks for the correction.


> On sage.math I get:
>
> In[1]:= Timing[N[Pi, 5000000]][[1]]
> Out[1]= 13.21
>
> sage: time a = N(pi, digits=5000000)
> CPU times: user 28.90 s, sys: 0.04 s, total: 28.94 s
> Wall time: 28.96 s
>
> However, mpmath is (barely) faster than Mathematica:
>
> sage: from sage.libs.mpmath.all import pi as p
> sage: time a = p(dps=5000000)
> CPU times: user 12.56 s, sys: 0.14 s, total: 12.70 s
> Wall time: 12.70 s


Nice!


>
>
> Fredrik
>
> >
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to