Ask Your Question

Revision history [back]

Just avoid the symbolic ring

sage: e_float = e.n() 
sage: pi_float = pi.n() 
sage: def s(n): 
....:     x=sqrt(2*pi_float*n)*((n/e_float)**n) 
....:     return x.numerical_approx()                                                                                                                                                                               
sage: s(10**10)                                                                                                                                                                                                     
2.32579597597705e95657055186