The variable popradians controls whether the trigonometric procedures take arguments, or produce results in degrees or radians. We can use the fact that "pi" is a built in constant thus:
true -> popradians;
sin(90) =>
** 0.893997
sin(pi/2) =>
** 1.0
arcsin(1) =>
** 1.5708
false -> popradians;
sin(90) =>
** 1.0
sin(pi/2) =>
** 0.027412
arcsin(1) =>
** 90.0