[Top] [Prev] [Next]


elem - elementary functions of applied mathematics


include "math.m";
math:= load Math Math->PATH;
cbrt, sqrt    : fn(x: real)   : real;
pow           : fn(x, y: real): real;
pow10         : fn(p: int)    : real;
hypot         : fn(x, y: real): real;
exp, expm1, log, log10, log1p: fn(x: real): real;
 cos,  cosh,  sin,  sinh,  tan,  tanh: fn(x: real): real;
acos, acosh, asin, asinh, atan, atanh: fn(x: real): real;
atan2         : fn(y, x: real): real;
lgamma        : fn(x: real)   :(int, real);
erf, erfc     : fn(x: real)   : real;
j0, j1, y0, y1: fn(x: real)   : real;
jn, yn        : fn(n: int, x: real): real;


These routines implement the basic elementary functions of applied mathematics.
sqrt (x)

Computes the square root of x.

cbrt (x)

Computes the cube root.

pow (x, y)

Computes x raised to the exponent y.

pow10 (p)

Raises 10 to the integer power n.

hypot (x, y)

Computes sqrt(x *x +y *y).

exp (x)

Returns the exponential function of x.

expm1 (x)

Equivalent to exp(x)-1.

log (x)

Returns the natural logarithm of x.

log10 (x)

Returns the logarithm base 10.

log1p (x)

Returns the logarithm of 1+x.

The trigonometric functions use radians. The ranges of the inverse functions are:






atan2 (y, x) = arctan (y /x)


lgamma (x)

The gamma function. The tuple returned, (s, lg) encodes the gamma function by (x) = s *exp(lg).

The hyperbolic trigonometric functions sinh etc. behave as expected.
erf (x)

The error function.

erfc (x)

Equivalent to 1 - erf(x).

The Bessel functions are computed by j0, j1, jn, y0, y1, and yn.

See Also

Limbo Math Modules

[Top] [Prev] [Next]

Copyright © 1996,Lucent Technologies, Inc. All rights reserved.