8
$\begingroup$

How can I convert a radian angle to a degree one and add ° after it?

I am using N[(Pi/4)/Degree], but the output is 45. with the point.

How can I have instead 45°?

$\endgroup$
2
  • 1
    $\begingroup$ perhaps Pi/4/. Pi -> 180 Degree $\endgroup$
    – vapor
    Commented May 29, 2017 at 9:45
  • $\begingroup$ I've edited the answer and reopened this question as I believe it will benefit future readers. That is subjective but there are precedents like this, I'm open to discussion. $\endgroup$
    – Kuba
    Commented May 30, 2017 at 6:37

1 Answer 1

12
$\begingroup$

I resolved that using

(Pi/4) * (180 Degree /Pi)

Degree is a symbol similar to Pi, it contains a value Pi / 180 and it keeps the symbolic form unless used with finite precision numbers.

All functions in Mathematica work with radians so this symbol is a convenient form of a scaling factor: 40 Degree is verbose but holds numerical value in radians.

Extracting radians is a simple as taking N[40 Degree], or using 40..

$\endgroup$
1
  • $\begingroup$ The bad thing is it doesn't work when the given angle is numeric, e.g. when obtained using NSolve[]. $\endgroup$
    – alejnavab
    Commented Jul 19, 2020 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.