There are four different versions of the math library routines: IEEE,
POSIX, X/Open, or SVID. The version may be selected at runtime by
setting the global variable
_LIB_VERSION, defined in
`math.h'. It may be set to one of the following constants defined
_LIB_VERSION variable is not specific to any
thread, and changing it will affect all threads.
The versions of the library differ only in how errors are handled.
In IEEE mode, the
matherr function is never called, no warning
messages are printed, and
errno is never set.
In POSIX mode,
errno is set correctly, but the
function is never called and no warning messages are printed.
In X/Open mode,
errno is set correctly, and
called, but warning message are not printed.
In SVID mode, functions which overflow return 3.40282346638528860e+38,
the maximum single precision floating point value, rather than infinity.
errno is set correctly,
matherr is called, and, if
matherr returns 0, warning messages are printed for some errors.
For example, by default `log(-1.0)' writes this message on standard
log: DOMAIN error
The library is set to X/Open mode by default.
Go to the first, previous, next, last section, table of contents.