1987-08-19 18:07:01 +00:00
|
|
|
(*$R-*)
|
1987-05-13 14:36:45 +00:00
|
|
|
IMPLEMENTATION MODULE MathLib0;
|
|
|
|
|
1987-05-27 10:05:01 +00:00
|
|
|
IMPORT Mathlib;
|
1987-05-13 14:36:45 +00:00
|
|
|
|
|
|
|
PROCEDURE cos(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.cos(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END cos;
|
|
|
|
|
|
|
|
PROCEDURE sin(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.sin(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END sin;
|
|
|
|
|
|
|
|
PROCEDURE arctan(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.arctan(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END arctan;
|
|
|
|
|
|
|
|
PROCEDURE sqrt(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.sqrt(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END sqrt;
|
|
|
|
|
|
|
|
PROCEDURE ln(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.ln(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END ln;
|
|
|
|
|
|
|
|
PROCEDURE exp(arg: REAL): REAL;
|
|
|
|
BEGIN
|
1987-05-27 10:05:01 +00:00
|
|
|
RETURN Mathlib.exp(arg);
|
1987-05-13 14:36:45 +00:00
|
|
|
END exp;
|
|
|
|
|
|
|
|
PROCEDURE entier(x: REAL): INTEGER;
|
|
|
|
BEGIN
|
1987-07-22 12:42:10 +00:00
|
|
|
IF x < 0.0 THEN
|
|
|
|
RETURN - TRUNC(-x);
|
|
|
|
END;
|
|
|
|
RETURN TRUNC(x);
|
1987-05-13 14:36:45 +00:00
|
|
|
END entier;
|
|
|
|
|
|
|
|
PROCEDURE real(x: INTEGER): REAL;
|
|
|
|
BEGIN
|
1987-07-22 12:42:10 +00:00
|
|
|
IF x < 0 THEN
|
|
|
|
RETURN - FLOAT(-x);
|
|
|
|
END;
|
|
|
|
RETURN FLOAT(x);
|
1987-05-13 14:36:45 +00:00
|
|
|
END real;
|
|
|
|
|
|
|
|
BEGIN
|
|
|
|
END MathLib0.
|