Hello,

It seems to be unnecessarily hard to numerically convert radians to degrees in Sage. For example, how does one convert arctan(4/5) radians to degrees?

The following

n(arctan(4/5))*sage.symbolic.units.convert(units.angles.radian,units.angles.degree)

returns

121.453369600239*degree/pi

Is there a simple way to just return a numerical answer (without multiplying by 180/pi)?

edit retag close merge delete

What is wrong with multiplying by 180/pi ?

( 2011-07-05 08:41:33 -0600 )edit

I just wanted to see if it could be done with Sage's units module.

( 2011-07-05 11:49:02 -0600 )edit

Sort by » oldest newest most voted

There's currently no way in Sage to do something like:

sage: angle_measurements('degrees')
sage: sin(90)
1
sage: arcsin(1)
90


At the moment, your best best is to either manually multiply/divide by 180/pi or write wrapper functions for the trig functions which do the conversions for you.

more

That's too bad. Thanks anyways!

( 2011-07-05 11:50:01 -0600 )edit