Next: Random Numbers, Previous: Bitwise Operations, Up: Numbers [Contents][Index]
These mathematical functions are available if floating point is supported (which is the normal state of affairs). They allow integers as well as floating point numbers as arguments.
These are the ordinary trigonometric functions, with argument measured in radians.
The value of (asin number)
is a number between -pi/2
and pi/2 (inclusive) whose sine is number; if, however, number
is out of range (outside [-1, 1]), then the result is a NaN.
The value of (acos number)
is a number between 0 and pi
(inclusive) whose cosine is number; if, however, number
is out of range (outside [-1, 1]), then the result is a NaN.
The value of (atan number)
is a number between -pi/2
and pi/2 (exclusive) whose tangent is number.
If optional argument number2 is supplied, the function returns
atan2(number,number2)
.
These are the ordinary hyperbolic trigonometric functions.
These are the inverse hyperbolic trigonometric functions.
This is the exponential function; it returns e to the power number. e is a fundamental mathematical constant also called the base of natural logarithms.
This function returns the logarithm of number, with base base.
If you don’t specify base, the base e
is used. If number
is negative, the result is a NaN.
This function returns the logarithm of number, with base 10. If
number is negative, the result is a NaN. (log10 x)
≡ (log x 10)
, at least approximately.
This function returns x raised to power y. If both arguments are integers and y is positive, the result is an integer; in this case, it is truncated to fit the range of possible integer values.
This returns the square root of number. If number is negative, the value is a NaN.
This returns the cube root of number.
Next: Random Numbers, Previous: Bitwise Operations, Up: Numbers [Contents][Index]