ack/lang/m2/libm2/Mathlib.def

110 lines
2.3 KiB
Modula-2
Raw Normal View History

DEFINITION MODULE Mathlib;
1988-02-19 15:54:01 +00:00
(*
Module: Mathematical functions
Author: Ceriel J.H. Jacobs
Version: $Header$
*)
(* Some mathematical constants: *)
CONST
(* From: Handbook of Mathematical Functions
Edited by M. Abramowitz and I.A. Stegun
National Bureau of Standards
Applied Mathematics Series 55
*)
pi = 3.141592653589793238462643;
twicepi = 6.283185307179586476925286;
halfpi = 1.570796326794896619231322;
quartpi = 0.785398163397448309615661;
e = 2.718281828459045235360287;
ln2 = 0.693147180559945309417232;
ln10 = 2.302585092994045684017992;
(* basic functions *)
PROCEDURE pow(x: REAL; i: INTEGER): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longpow(x: LONGREAL; i: INTEGER): LONGREAL;
PROCEDURE sqrt(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longsqrt(x: LONGREAL): LONGREAL;
PROCEDURE exp(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longexp(x: LONGREAL): LONGREAL;
PROCEDURE ln(x: REAL): REAL; (* natural log *)
1988-06-30 16:32:54 +00:00
PROCEDURE longln(x: LONGREAL): LONGREAL; (* natural log *)
PROCEDURE log(x: REAL): REAL; (* log with base 10 *)
1988-06-30 16:32:54 +00:00
PROCEDURE longlog(x: LONGREAL): LONGREAL; (* log with base 10 *)
(* trigonometric functions; arguments in radians *)
PROCEDURE sin(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longsin(x: LONGREAL): LONGREAL;
PROCEDURE cos(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longcos(x: LONGREAL): LONGREAL;
PROCEDURE tan(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longtan(x: LONGREAL): LONGREAL;
PROCEDURE arcsin(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarcsin(x: LONGREAL): LONGREAL;
PROCEDURE arccos(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarccos(x: LONGREAL): LONGREAL;
PROCEDURE arctan(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarctan(x: LONGREAL): LONGREAL;
(* hyperbolic functions *)
PROCEDURE sinh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longsinh(x: LONGREAL): LONGREAL;
PROCEDURE cosh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longcosh(x: LONGREAL): LONGREAL;
PROCEDURE tanh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longtanh(x: LONGREAL): LONGREAL;
PROCEDURE arcsinh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarcsinh(x: LONGREAL): LONGREAL;
PROCEDURE arccosh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarccosh(x: LONGREAL): LONGREAL;
PROCEDURE arctanh(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longarctanh(x: LONGREAL): LONGREAL;
(* conversions *)
PROCEDURE RadianToDegree(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longRadianToDegree(x: LONGREAL): LONGREAL;
PROCEDURE DegreeToRadian(x: REAL): REAL;
1988-06-30 16:32:54 +00:00
PROCEDURE longDegreeToRadian(x: LONGREAL): LONGREAL;
END Mathlib.