next up previous contents
Next: Other global variables Up: CHAPTER.5: NUMERICAL AND Previous: Other arithmetic procedures

Illustrating popradians

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


Aaron Sloman
Fri Jan 2 03:17:44 GMT 1998