Trigonometric Functions


Synopsis

(std-tan <radians>) ; tangens = sin x / cos x

(std-sec <radians>) ; secant

(std-csc <radians>) ; cosecant

(std-acos <radians>) ; arc cosine

(std-asin <radians>) ; arc sine

(std-asec <real>) ; arc secant

(std-acsc <real>) ; arc cosecant

(std-acot <real>) ; arc cotangent

Description

These are some missing triginometric functions. Most of them have specific behaviour at certain numeric ranges.

STD-TAN has extra code to overcome numeric accuracy problems with (cos 0.0) and more, to return exact values of *INFINITY and 0.0 at the extrema angles (the multiples of PI and 2*PI).

The other functions not yet, so you might need to use STD-EQUALP (numerically fuzzy) to check for numeric equality.

Example

(std-tan  *PI2*)  => 0.0
(std-tan  0)      => 0.0
(std-tan  *PI/2*) => *INFINITY*
(std-tan  (- *PI/2*)) => *INFINITY*

Arguments

radians: a real number

real: a real number

Return Value

A real number

Side Effects

None

Module

(std-require 'STDMATH)

Defined in STDMATH