Some mathematical functions automatically evaluate to floating-point, even for a symbolic input
(integer or variable):
sage: Ei(10)
2492.22897624
sage: bessel_J(0,10)
-0.245935764451348
sage: bessel_J(0,x)
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call last)
/tmp/gmp-4.2.2/tune/<ipython console> in <module>()
/usr/local/sage-2.8.12/sage/local/lib/python2.5/site-packages/sage/functions/special.py in bessel_J(nu, z, alg, prec)
492 else:
493 K,a = _setup(prec)
--> 494 b = K(nu.besselj(z))
495 pari.set_real_precision(a)
496 return b
/tmp/gmp-4.2.2/tune/real_mpfr.pyx in sage.rings.real_mpfr.RealField.__call__()
/tmp/gmp-4.2.2/tune/real_mpfr.pyx in sage.rings.real_mpfr.RealNumber._set()
<type 'exceptions.TypeError'>: Unable to convert x (='1-1/4*x^2+1/64*x^4-1/2304*x^6+1/147456*x^8-1/14745600*x^10+1/2123366400*x^12-1/416179814400*x^14+1/106542032486400*x^16+O(x^17)') to real number.
In my opinion, foo(10) should evaluate to foo(10), and similarly foo(x).