Minimal testcase:

sage: h(x) = floor(x)
sage: h(pi)._numerical_approx()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-76-e2c08591fe0c> in <module>()
----> 1 h(pi)._numerical_approx()

/home/vbraun/Code/sage.git/src/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression._numerical_approx 
(build/cythonized/sage/symbolic/expression.cpp:27487)()
   4888         # in pynac
   4889         if is_a_numeric(x._gobj):
-> 4890             res = py_object_from_numeric(x._gobj)
   4891         elif  is_a_constant(x._gobj):
   4892             res = x.pyobject()

TypeError: cannot evaluate symbolic expression numerically



On Monday, March 30, 2015 at 6:46:08 AM UTC+2, William wrote:
>
> Hi, 
>
> If I type 
>
>  sage: N(sqrt(floor(80000000000*pi) - 1)) 
>
> I get a number as expected. 
>
> If I type 
>
> sage: h(x) = (floor(8*pi*10^x)-1)^(1/2) 
> sage: a = h(10); a 
> sqrt(floor(80000000000*pi) - 1) 
>
> that seems fine.  But if I then do 
>
> sage: N(a) 
> Traceback: 
> File 
> "/usr/local/sage/sage-6.5/local/lib/python2.7/site-packages/sage/misc/functional.py",
>  
>
> line 1298, in numerical_approx return x._numerical_approx(prec, 
> algorithm=algorithm) File "sage/symbolic/expression.pyx", line 4874, 
> in sage.symbolic.expression.Expression._numerical_approx 
> (build/cythonized/sage/symbolic/expression.cpp:27342) 
> raise TypeError("cannot evaluate symbolic expression numerically") 
>
>
> Any idea what is going on here? 
>
>
>  -- william 
>
>
> -- 
> William (http://wstein.org) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to