Next: , Previous: , Up: Numbers   [Contents][Index]


9.9 Standard Mathematical Functions

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.

Function: sin number
Function: cos number
Function: tan number

These are the ordinary trigonometric functions, with argument measured in radians.

Function: asin number

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.

Function: acos number

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.

Function: atan number &optional number2

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).

Function: sinh number
Function: cosh number
Function: tanh number

These are the ordinary hyperbolic trigonometric functions.

Function: asinh number
Function: acosh number
Function: atanh number

These are the inverse hyperbolic trigonometric functions.

Function: exp number

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.

Function: log number &optional base

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.

Function: log10 number

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.

Function: expt x y

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.

Function: sqrt number

This returns the square root of number. If number is negative, the value is a NaN.

Function: cube-root number

This returns the cube root of number.


Next: , Previous: , Up: Numbers   [Contents][Index]