Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

plotting prime_pi

Maybe I am missing something really simple, but shouldn't one be able to plot prime_pi?


----------------------------------------------------------------------
| Sage Version 4.5.1, Release Date: 2010-07-19                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: plot(prime_pi(x),3,10)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/dept/finotti/<ipython console=""> in <module>()

/scratch/local/sage-4.5.1/local/lib/python2.6/site-packages/sage/functions/prime_pi.so in sage.functions.prime_pi.PrimePi.__call__ (sage/functions/prime_pi.c:1064)()

/scratch/local/sage-4.5.1/local/lib/python2.6/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.__int__ (sage/symbolic/expression.cpp:4171)()

/scratch/local/sage-4.5.1/local/lib/python2.6/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression.n (sage/symbolic/expression.cpp:17042)()

TypeError: cannot evaluate symbolic expression numerically

It seems wot work fine with real input


sage: prime_pi(pi)
_3 = 2
sage: prime_pi(1020.312788)
_4 = 171

Thanks,

Luis