@interlisp @amoroso
@kentpitman

Why do the ATAN and ARCTAN functions in #Medley #Interlisp return the result angle in degrees rather than radian?

I know the answer is (the fixnum 42), but why?

Questions over questions?

@interlisp @amoroso @kentpitman

Found it:

Must say:
(ARCTAN 1 T) ;; ==> PI/4

(ARCTAN 1) and (ARCTAN 1 NIL) give 45 (degrees).

@alexshendi @interlisp @amoroso @kentpitman Always worthwhile checking the documentation - e.g.
(ARCTAN ?=<return>
will show the argument names which often gives a clue, and
(ARCTAN ?<return>
[both in the exec] will bring up the DINFO browser and show the full documentation if it exists (for CL functions it will bring up the CLHS in a browser)

@alexshendi The reason was likely not technical, e.g. using a specific algorithm. Rather, degrees by default was probably more natural. As [email protected] suggested to look up in the manual, ATAN/ARCTAN take an optional argument to return radians. This style of optional arguments with flags is typical of Interlisp.

@amoroso @kentpitman