Ask Your Question
1

Radian–degree conversion

asked 2011-07-04 22:50:01 +0100

Eviatar Bach gravatar image

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 flag offensive close merge delete

Comments

What is wrong with multiplying by 180/pi ?

benjaminfjones gravatar imagebenjaminfjones ( 2011-07-05 15:41:33 +0100 )edit

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

Eviatar Bach gravatar imageEviatar Bach ( 2011-07-05 18:49:02 +0100 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2011-07-05 18:01:14 +0100

Mike Hansen gravatar image

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.

edit flag offensive delete link more

Comments

That's too bad. Thanks anyways!

Eviatar Bach gravatar imageEviatar Bach ( 2011-07-05 18:50:01 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-07-04 22:50:01 +0100

Seen: 6,202 times

Last updated: Jul 05 '11