Elementary Functions
The defined name of this module is mathlib. The
functionality defined for this module is intentionally precisely that of the
trigonmetric functions, hyperbolic functions, exponential and logarithmic
functions and power functions defined for <math.h> in
ISO/IEC 9899 : 1990 with the exceptions of frexp,
ldexp and modf.
pi :
double-float
Remarks
The value of pi is the ratio the
circumference of a circle to its diameter stored to double precision floating
point accuracy.
acos :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the principal value of the arc cosine of float which
is a value in the range [0; pi] radians. An error is signalled (condition-class:
domain-condition) if float is not in the range [1; +1].
asin :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the principal value of the arc sine of float which is
a value in the range [pi=2; +pi=2] radians. An error is signalled
(condition-class: domain-condition) if float is not in the
range [1; +1].
atan :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the principal value of the arc tangent of float which
is a value in the range [pi=2; +pi=2] radians.
atan2 :
generic-function
Generic arguments
- (float1 <float>)
- A floating
point number.
- (float2 <float>)
- A floating
point number.
Result
Computes the principal value of the arc tangent of
float1 /float2 , which is a value in the range [pi; +pi] radians, using the signs of
both arguments to determine the quadrant of the result. An error might be
signalled (condition-class: domain-condition) if either float1
or float2 is zero.
cos :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the cosine of float (measured in radians).
sin :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the sine of float (measured in radians).
tan :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the tangent of float (measured in radians).
cosh :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the hyperbolic cosine of float. An error might be
signalled (condition class: range-condition) if the magnitude
of float is too large.
sinh :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the hyperbolic sine of float. An error might be
signalled (condition class: range-condition) if the magnitude
of float is too large.
tanh :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the hyperbolic tangent of float.
exp :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the exponential function of float. An error might
be signalled (condition class: range-condition) if the
magnitude of float is too large.
log :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the natural logarithm of float. An error is signalled
(condition class: domain-condition) if float is negative. An
error might be signalled (condition class: range-condition) if float is zero.
log10 :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the base-ten logarithm of float. An error is
signalled (condition class: domain-condition) if float is
negative. An error might be signalled (condition class:
range-condition) if float is zero.
pow :
generic-function
Generic arguments
- (float1 <float>)
- A floating
point number.
- (float2 <float>)
- A floating
point number.
Result
Computes float1 raised to the power float2 . An error is
signalled (condition class: domain-condition) if float1 is
negative and float2 is not integral. An error is signalled (condition class:
domain-condition) if the result cannot be represented when
float1 is zero and float2 is less than or equal to zero. An error might be
signalled (condition class: range-condition) if the result
cannot be represented.
sqrt :
generic-function
Generic arguments
- (float <float>)
- A floating
point number.
Result
Computes the non-negative square root of float. An error is
signalled (condition class: domain-condition) if float is
negative.