HP-UX 11i Version 2 Release Notes (October 2003)
Libraries and Programming
HP Math Library (libm)
Chapter 9
219
• The product Web page, located at
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1
,1703,1844,00.html
Obsolescence
Not applicable.
HP Math Library (libm)
The HP Math Library, libm, provides mathematical functions for C, C++, and Fortran90.
The math.h, complex.h, tgmath.h, and fenv.h headers provide C interface, and the
headers cmath and complex provide C++ interface for the libm library.
The libm library supports all mathematical functions specified by the C standard,
ANSI/ISO/IEC 9899:1999 (C99), as well as functions specified by the XPG4.2, SVID, and
COSE Common API (Spec 1170) specifications.
Summary of Change
The following describes changes to the libm, math.h, complex.h, tgmath.h, fenv.h,
cmath, and complex components for HP-UX 11i v2.
• Major performance upgrade for power functions: pow[fwlq], pown[fwlq], and
powlln[fwlq].
• Miscellaneous minor performance and accuracy tuneups.
•New sincos[fwlq] functions in the HPUX namespace in the math.h and cmath
headers compute both sin(x) and cos(x). These have the same interface as the Intel
sincos() functions.
•New cis[fwlq] functions in the HPUX namespace in the complex.h, tgmath.h, and
complex headers compute the complex value cos(x) + i sin(x), for real x. These have
the same interface as the Intel cis() functions.
• To conform to C99 TC1, functions in fenv.h previously of type void have been
changed to return int (0 indicating success). The affected functions are
feclearexcept(), feraiseexcept(), fegetexceptflag(), fesetexceptflag(),
fegetenv(), fesetenv(), and feupdateenv().
•A switch (_INCLUDE_STDC__SOURCE_199901) has been introduced into math.h() to
support a strict C99 namespace. See documentation for the -AC99 compile option.
Impact
The change in the return type of fenv.h functions will not affect existing normal use,
which will ignore the new return value. On HP-UX the return value will always be 0
(indicating success).