Next: Random Numbers, Previous: Bitwise Operations, Up: Numbers
These mathematical functions allow integers as well as floating point numbers as arguments.
These are the ordinary trigonometric functions, with argument measured in radians.
The value of
(asinarg)is a number between −pi/2 and pi/2 (inclusive) whose sine is arg; if, however, arg is out of range (outside [−1, 1]), it signals adomain-errorerror.
The value of
(acosarg)is a number between 0 and pi (inclusive) whose cosine is arg; if, however, arg is out of range (outside [−1, 1]), it signals adomain-errorerror.
The value of
(atany)is a number between −pi/2 and pi/2 (exclusive) whose tangent is y. If the optional second argument x is given, the value of(atan y x)is the angle in radians between the vector[x,y]and theXaxis.
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.
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, it signals a
domain-errorerror.
This function returns the logarithm of arg, with base 10. If arg is negative, it signals a
domain-errorerror.(log10x)==(logx10), at least approximately.