Next: , Previous: , Up: syslib numerics   [Index]


12.10.35 Trigonometric arc tangent

Unsafe Operation: $atan2-real-real imp rep

Compute the principal value of the trigonometric arc tangent of flonum imp over flonum rep using the signs of the arguments to determine the quadrant of the result:

\alpha = \atan (imp/rep)

in other words compute the angle \alpha such that:

               \sin(\alpha)   imp
\tan(\alpha) = ------------ = ---
               \cos(\alpha)   rep

in yet other words compute the angle of the complex number having the flonum rep as real part and the flonum imp as imaginary part:

(angle (make-rectangular rep imp))

return a flonum. This operation is implemented using the POSIX function atan2().

Unsafe Operation: $atan-fixnum fx

Compute the trigonometric arc tangent of fx; return a flonum.

Unsafe Operation: $atan-bignum bn

Compute the trigonometric arc tangent of bn; return a flonum.

Unsafe Operation: $atan-ratnum rt

Compute the trigonometric arc tangent of rt; return a flonum.

Unsafe Operation: $atan-flonum fl

Compute the trigonometric arc tangent of fl; return a flonum.

Unsafe Operation: $atan-cflonum cfl

Compute the trigonometric arc tangent of fl; return a cflonum.

Unsafe Operation: $atan-compnum cn

Compute the trigonometric arc tangent of fl; return a number object.