HP SunSoft Pascal 4.0 Manuale Utente Pagina 260

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 333
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 259
236 Pascal 4.0 Users 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.
Vedere la pagina 259
1 2 ... 255 256 257 258 259 260 261 262 263 264 265 ... 332 333

Commenti su questo manuale

Nessun commento