Intro(3M)Intro(3M)NAME
Intro, intro - introduction to Oracle Solaris Studio mathematical
library functions
SYNOPSIS
cc [ flag ... ] file ... -lsunmath -lm [ library ... ]
DESCRIPTION
The Oracle Solaris Studio math library, libsunmath, provides several
useful nonstandard mathematical functions and routines that support
IEEE 754-1985 floating point arithmetic. libsunmath is provided as a
shared object and as a static archive. Both forms are located in the
compiler products area, typically installed under /opt/SUNWspro.
The header file <sunmath.h> defines types and constants and provides
prototypes for the functions in libsunmath. This header file is also
located in the compiler products area.
Some functions in libsunmath depend on functions in libm, the Solaris
system math library. Therefore, C programs that use libsunmath should
be linked with the compiler options -lsunmath -lm.
The functions in libsunmath are documented in section 3M of the com‐
piler products man pages, typically found in /opt/SUNWspro/man.
See libm(3LIB) for information about the functions in libm.
SEE ALSOIntro(3), fenv.h(3HEAD), math.h(3HEAD), libm(3LIB)NOTES
The functions in libsunmath that are specified by IEEE 754-1985 handle
special cases and exceptions in accordance with the standard. The
functions in libsunmath that are not specified by IEEE 754-1985 handle
special cases and exceptions in the spirit of the standard, analogous
to the way these cases are handled by functions in libm when either the
-xlibmieee compiler flag or the -xc99 compiler flag is specified.
Functions whose values are generally not exactly representable, such as
the scaled trigonometric functions or the financial functions, deliver
results that are accurate to within a few units in the last place.
They may not be correctly rounded according to the prevailing rounding
modes, however, and the inexact exception may not be treated correctly
(i.e., raised or not raised, as appropriate).
libsunmath contains many functions that were not previously in libm but
have been added to it as of Solaris 10. Therefore, when a program that
uses these functions is linked with the options -lsunmath -lm, it will
invoke the functions in libsunmath rather than those in libm. If the
same program is linked with -lm only, it will invoke the functions in
libm. In some cases, the functions in libm may deliver results that
differ slightly (by at most a few units in the last place) from the
same functions in libsunmath.
May 2010 Intro(3M)