[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: atan/atan2 -- possible changes.

why did this letter contain ^g's?
Received: from MIT-LISPM-1 by MIT-OZ via Chaosnet; 22 Feb 84 16:44-EST
Date: Wednesday, 22 February 1984, 16:45-EST
From:  <Mly at MIT-OZ>
Subject: atan/atan2 -- possible changes.
To: info-lispm at MIT-OZ

Here's how things stand at the present:

There presently are two functions for taking arctangents,
"atan" and "atan2".

The difference between them is that atan returns a value
in the range 0 to 2*pi, whereas atan2 returns a value in
the range -pi to pi.
(ie  atan:(RxR)  [0,2]
    atan2:(RxR)  [-,])

atan is defined the way it is mainly for maclisp compatibility --
nearly everybody else in the computer languages world (*including
common lisp*) believes that a function called "atan" should return
what the lisp machine's atan2 returns.

So, the $64000 question is:
 Would anybody like to vote on whether the definition of atan
 should change to be what atan2 is now???

Such a change would not take place immediately, and in the meantime
the compiler could generate a warning saying to use atan2, whose
definition will not change.