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.
Summary of Contents for SunSoft Pascal 4.0
Page 14: ...xiv Pascal 4 0 User s Guide ...
Page 16: ...xvi Pascal 4 0 User s Guide ...
Page 30: ...6 Pascal 4 0 User s Guide 1 ...
Page 160: ...136 Pascal 4 0 User s Guide 6 ...
Page 268: ...244 Pascal 4 0 User s Guide 11 ...
Page 320: ...296 Pascal 4 0 User s Guide B ...
Page 331: ...Index 307 ...
Page 333: ......