236
Pascal 4.0 User’s Guide
11
The following Pascal program is an example of how to use math functions.
IEEE Support Functions
This section describes the IEEE support functions, including
ieee_functions()
,
ieee_values()
, and
ieeee_retrospective()
.
program TestLibm(output);
#include <math_p.h>
var
d0,d1,d2: double;
f0,f1,f2: single;
begin
d0 := 0.0; d1 := 1.0; d2 := 2.0;
f0 := 0.0; f1 := 1.0; f2 := 2.0;
writeln('Trigonometric functions');
writeln(sin(d0));
writeln(sinf(f0));
sincos(M_PI_2, d1, d2);
writeln(d1, d2);
sincosf(M_PI_2, f1, f2);
writeln(f1, f2);
writeln('Exponential, logarithm, power');
writeln(exp(d1));
writeln(log(d1));
writeln(pow(d1, d1));
writeln(expf(f1));
writeln(logf(f1));
writeln(powf(f1, f1));
end.
Содержание SunSoft Pascal 4.0
Страница 14: ...xiv Pascal 4 0 User s Guide ...
Страница 16: ...xvi Pascal 4 0 User s Guide ...
Страница 30: ...6 Pascal 4 0 User s Guide 1 ...
Страница 160: ...136 Pascal 4 0 User s Guide 6 ...
Страница 268: ...244 Pascal 4 0 User s Guide 11 ...
Страница 320: ...296 Pascal 4 0 User s Guide B ...
Страница 331: ...Index 307 ...
Страница 333: ......