1 | initial version |
Given most object in Sage that have a numerical counterpart you can use the function numerical_approx.
sage: pi.numerical_approx(digits=2)
3.1
sage: (cos(pi/7) + sin(pi/13)).numerical_approx(digits=10)
1.140284532
Alternatively, you obtain the same result with
sage: numerical_approx(pi, digits=2)
3.1
sage: numerical_approx(cos(pi/7) + sin(pi/13), digits=10)
1.140284532