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


5.4.8 Mathematical Functions

Functions below returns float type number.

Function: exp x

Return ‘e’ (the base of natural logarithms) raised to the power x.

Function: log x

Return the natural logarithm of x. An arithmetic error is signalled if x is less than zero.

Function: sin x

Return the sine of angle x; x is in terms of radians.

Function: cos x

Return the cosine of angle x.

Function: tan x

Return the tangent of angle x.

Function: asin x

Return the arc sine of x (the value whose sine is x), in radians.

Function: acos x

Return the arc cosine of x.

Function: atan x

Return the arc tangent of x.

Function: sqrt x

Return the non-negative square root of x. Currently, if x is negative, an arithmetic error is signalled.

Function: expt x y

Returns x raised to the power y.

If x is negative and y is a non-integer, then an arithmetic error is signalled (mathematically should return a complex number).