Mathematica in degrees mode

Possibly a bad idea for the reasons mentioned in previous messages, but you could do something like the following:

SetAttributes[trigMode, HoldAllComplete];
trigMode[expr_] := 
 Unevaluated[expr] /. 
    {(f : ArcSin | ArcCos | ArcTan | ArcCot | ArcSec | ArcCsc)[x_] :> 180 f[x]/π,
     (f : Sin | Cos | Tan | Cot | Sec | Csc)[x_] :> f[x °]};

$Pre = trigMode;

Sin[90]
(* 1 *)

ArcSin[Sqrt[3]/2]
(* 60 *)

Plot[Sin[x], {x, 0, 360}]

sine in degrees

I used $Pre to make sure my function trigMode is applied to every input expression. It was important that the function has the attribute HoldAllComplete (so it doesn't evaluate on me and therefore ArcSin[Sqrt[3]/2] doesn't get transformed to π/3 before I have a chance to catch it and apply a transformation rule). trigMode uses some pattern matching to find parts of the expression that contain "trig functions" and makes sure they get treated like a calculator in "degree mode" would.

When you want to go back to the standard mode, use $Pre = . to clear.


Sin[60 Degree]

$\frac{\sqrt{3}}{2}$

Plot[Sin[alpha Degree], {alpha, 0, 360}]

enter image description here

ToDeg[rad_] := N[rad/Degree];
FromDeg[deg_] := N[Degree deg];

ToDeg[ArcSin[Sqrt[3]/2]]
60.

See also: https://stackoverflow.com/questions/8313489/set-degrees-as-default-in-mathematica-8