Math libraries – HP SunSoft Pascal 4.0 User Manual
Page 257

233
Math Libraries
11
This chapter describes how to use the
libm
and
libsunmath
functions in
Pascal programs. The math libraries are always accessible from a Pascal
program because the Pascal compiler driver
pc
calls
ld
, the linker and loader,
with the
-lsunmath -lm
options. If you compile Pascal program with the
-v
option, it prints the command-line used to call each of the compilation passes.
For convenience, Pascal supports special Pascal header files,
math_p.h
and
sunmath_p.h
, which contain prototypes of math functions, procedures, and
some useful constants. The
math_p.h
file refers to
sunmath_p.h
by an
#include
directive.
This chapter contains the following sections:
Contents of the Math Libraries
page 234
libm Functions
page 235
IEEE Support Functions
page 236
SPARC Libraries
page 238
Arithmetic Exceptions
page 239
Math Library Exception-Handling Function: matherr()
page 240
libsunmath Support for IEEE Modes and Exceptions
page 242