Oops, I see I got the decimal point wrong, but you get the idea. Also note that if you use floats you will get a Float (SymPy's version of the float) automatically, but if you use integers or Rationals, you will not:
>>> h.subs(x, 2) cos(2) >>> _.n() -0.416146836547142 >>> h.subs(x, S(1)/2) cos(1/2) >>> _.n() 0.877582561890373 >>> h.subs(x, pi/3) 1/2 >>> _.n() 0.500000000000000 -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.