RealFnsExtras.mesa
Last Update by E. McCreight, November 16, 1984 11:47:34 am PST
RealFnsExtras: CEDAR DEFINITIONS =
BEGIN
For further information about these functions, as well as their approximations, see Computer Approximations, by Hart, Cheney, Lawson, Maehly, Mesztenyi, Rice, Thacher, and Witzgall, published by Wiley.
Hyperbolic Circle Functions
SinH, CosH, TanH, CotH: PROC [x: REAL] RETURNS [REAL];
InvSinH: PROC [x: REAL] RETURNS [REAL];
InvCosH: PROC [x: REAL] RETURNS [REAL];
...defined for x >= 1.0, returns non-negative result
InvTanH: PROC [x: REAL] RETURNS [REAL];
...defined for x IN (-1.0..1.0)
InvCotH: PROC [x: REAL] RETURNS [REAL];
...defined for x NOT IN [-1.0..1.0]
Gamma Functions
LnGamma: PROC [x: REAL] RETURNS [REAL];
.. defined for x>0
Gamma: PROC [x: REAL] RETURNS [REAL] -- = {RETURN[RealFns.Exp[LnGamma[x]]]} -- ;
.. defined for x>0
Gamma[x+1] = x! for integer x.
Error Function
Erf: PROC [x: REAL] RETURNS [REAL] -- = {RETURN[1.0-Erfc[x]]} -- ;
Erfc: PROC [x: REAL] RETURNS [REAL];
1.0-2*Integral[ from: 0, to: x, expr: Exp[-t*t], variable: t ]/pi
Gaussian Probability Integrals
P: PROC [x: REAL] RETURNS [REAL] = INLINE {RETURN[0.5*(2.0+Erf[invRoot2*x])]};
Integral[ from: minusInfinity, to: x, expr: Exp[-t*t/2], variable: t ]/SqRt[2*pi]
A: PROC [x: REAL] RETURNS [REAL] = INLINE {RETURN[Erf[invRoot2*x]]};
Integral[ from: -x, to: x, expr: Exp[-t*t/2], variable: t ]/SqRt[2*pi]
Bessel Functions
J0: PROC [x: REAL] RETURNS [REAL];
Bessel function of first kind of order 0
J1: PROC [x: REAL] RETURNS [REAL];
Bessel function of first kind of order 1
Jn: PROC [n: INT, x: REAL] RETURNS [REAL];
Bessel function of first kind of order n
Y0: PROC [x: REAL] RETURNS [REAL];
Bessel function of second kind of order 0
Y1: PROC [x: REAL] RETURNS [REAL];
Bessel function of second kind of order 1
Yn: PROC [n: INT, x: REAL] RETURNS [REAL];
Bessel function of second kind of order n
Complete Elliptic Integrals
K: PROC [m: REAL] RETURNS [REAL];
Complete elliptic integral of the first kind
.. defined for m IN [0.0..1.0)
E: PROC [m: REAL] RETURNS [REAL];
Complete elliptic integral of the second kind
.. defined for m IN [0.0..1.0]
pi: REAL = 3.1415926535;
invRoot2: REAL = 0.70710678119;
Unimplemented, BadArgument: ERROR;
END.