[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.9 Standard Mathematical Functions

These mathematical functions allow integers as well as floating point numbers as arguments.

Function: sin arg
Function: cos arg
Function: tan arg
These are the ordinary trigonometric functions, with argument measured in radians.

Function: asin arg
The value of (asin arg) is a number between -pi/2 and pi/2 (inclusive) whose sine is arg; if, however, arg is out of range (outside [-1, 1]), then the result is a NaN.

Function: acos arg
The value of (acos arg) is a number between 0 and pi (inclusive) whose cosine is arg; if, however, arg is out of range (outside [-1, 1]), then the result is a NaN.

Function: atan arg
The value of (atan arg) is a number between -pi/2 and pi/2 (exclusive) whose tangent is arg.

Function: exp arg
This is the exponential function; it returns e to the power arg. e is a fundamental mathematical constant also called the base of natural logarithms.

Function: log arg &optional base
This function returns the logarithm of arg, with base base. If you don't specify base, the base e is used. If arg is negative, the result is a NaN.

Function: log10 arg
This function returns the logarithm of arg, with base 10. If arg 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 arg
This returns the square root of arg. If arg is negative, the value is a NaN.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 2, 2002 using texi2html