id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
16587 f(expr,hold).n() fails for all generalized functions rws "{{{
sage: M = sgn((3/2),hold=True); M.n()
...
TypeError: cannot evaluate symbolic expression numerically
}}}
The original problem is now resolved, it was reported in http://ask.sagemath.org/question/8535/problem-with-sign-sgn-and-n/ by Louis Cypher:
{{{
sage: M = sgn(cos(3/2))
sage: M.n()
TypeError Traceback (most recent call last)
in ()
----> 1 M.n()
/home/ralf/sage/local/lib/python2.7/site-packages/sage/symbolic/expression.so in sage.symbolic.expression.Expression._numerical_approx (build/cythonized/sage/symbolic/expression.cpp:24086)()
TypeError: cannot evaluate symbolic expression numerically
}}}
kcrisman:
Problem seems to be that in `M.n??` we see that it's looking for `is_a_numeric(x._gobj)` but apparently that fails, as does the constant, so it thinks we are looking at evaluating `sgn(cos(x))` instead of `sgn(cos(3/2))`.
" defect closed major sage-7.3 symbolics fixed sgn, evaluation kcrisman Ralf Stephan Paul Masson N/A e7880b7caa636ff4d24bccacb5c21f4285d1164c e7880b7caa636ff4d24bccacb5c21f4285d1164c #17130, #17285