On Oct 22, 2009, at 5:56 AM, Nathann Cohen wrote:

> Hello everybody !!!
>
> I know this is totally useless, but why shouldn't it work  
> nevertheless ? :-)
>
> sage: n(pi,digits=10000000)
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent  
> call last)
>
> /user/ncohen/home/.sage/temp/rebelote.inria.fr/22749/ 
> _user_ncohen_home__sage_init_sage_0.py in <module>()
>
> /usr/local/sage/local/lib/python2.6/site-packages/sage/misc/ 
> functional.pyc in numerical_approx(x, prec, digits)
>    1013             prec = int((digits+1) * 3.32192) + 1
>    1014     try:
> -> 1015         return x.numerical_approx(prec)
>    1016     except AttributeError:
>    1017         from sage.rings.complex_double import  
> is_ComplexDoubleElement
>
> /usr/local/sage/local/lib/python2.6/site-packages/sage/symbolic/ 
> expression.so in sage.symbolic.expression.Expression.n (sage/ 
> symbolic/expression.cpp:15733)()
>
> /usr/local/sage/local/lib/python2.6/site-packages/sage/symbolic/ 
> pynac.so in sage.symbolic.pynac.py_eval_constant (sage/symbolic/ 
> pynac.cpp:13759)()
>
> /usr/local/sage/local/lib/python2.6/site-packages/sage/rings/ 
> real_mpfr.so in sage.rings.real_mpfr.RealField_constructor (sage/ 
> rings/real_mpfr.c:3972)()
>
> /usr/local/sage/local/lib/python2.6/site-packages/sage/rings/ 
> real_mpfr.so in sage.rings.real_mpfr.RealField.__init__ (sage/rings/ 
> real_mpfr.c:4201)()
>
> ValueError: prec (=33219204) must be >= 2 and <= 16777216.

This is a known limitation (due to a workaround for a fixed MPFR bug.)  
See http://trac.sagemath.org/sage_trac/ticket/2567 . Should be an easy  
fix.

- Robert

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to