What I would like to do is the following:
var('theta')
theta
theta=25*units.angles.degree
print theta
25*degree
a=sin(theta)
print a
sin(25*degree)
At this point, I type 'a.' and tab and in the popup list of functions I find numerical_approx. So I type in:
a.numerical_approx() Traceback (click to the left of this block for traceback)
...
TypeError: cannot evaluate symbolic expression numerically
Okay, it would appear that adding the units to theta turns it into a symbolic variable which turns my expression a into a symbolic expression. But what I would like to do is enter my angle theta in either degrees or radians and get a numerical approximation of the answer based on the units of the input. Is there a clean way to do this?