math.5 (2010 09)

m
math(5) math(5)
M_LN10, M_LN10l The natural logarithm of 10.
M_PI, M_PIl The ratio of the circumference of a circle to its diameter. (There are also several
fractions of π, its reciprocal, and its square root:
M_PI_2, M_PI_4, M_1_PI,
M_2_PI, and M_2_SQRTPI, and for long double
, M_PI_2l, M_PI_4l,
M_1_PIl, M_2_PIl, and M_2_SQRTPIl).
M_SQRT2, M_SQRT2l
The positive square root of 2.
M_SQRT1_2, M_SQRT1_2l
The positive square root of 1/2.
For the definitions of various machine-dependent constants, see the description of the
<values.h>
header file.
INTEGRITY SERVERS ONLY
Additional Types
For HP Integrity servers, included in a compilation under the
-fpwidetypes option, this file also
defines the types:
extended The Integrity server 80-bit double-extended type.
quad An IEEE 754-compliant, 128-bit floating-point type. On HP-UX,
quad is a
synonym for
long double.
To use one of the types
extended or quad, you must compile with the -fpwidetypes
option.
Error Handling
For Integrity servers, it defines the following integer constants which identify the error handling method
supported by
<math.h> functions:
MATH_ERRNO Indicates support for the ISO/IEC C99 errno specification.
MATH_ERREXCEPT Indicates support for the ISO/IEC C99 exception flag specification.
math_errhandling
Defined to be (MATH_ERRNO | MATH_ERREXCEPT)
if the +Olibmerrno com-
piler option is used, or defined to be
MATH_ERREXCEPT
otherwise.
Decimal Floating Point
For Integrity servers HP-UX 11i v3 September 2008 Update (and later), included in a compilation where
__STDC_WANT_DEC_FP__
has been defined, this file defines types and macros for decimal floating
point.
It defines the types:
_Decimal32_t A decimal floating type, at least as wide as _Decimal32.IfDEC_EVAL_METHOD
equals 0, _Decimal32_t is _Decimal32;ifDEC_EVAL_METHOD
equals 1,
_Decimal32_t is _Decimal64;ifDEC_EVAL_METHOD equals 2,
_Decimal32_t is _Decimal128.
_Decimal64_t A decimal floating type, at least as wide as _Decimal64.IfDEC_EVAL_METHOD
equals 0 or 1, _Decimal64_t is _Decimal64;ifDEC_EVAL_METHOD equals 2,
_Decimal64_t is _Decimal128.
The value of
DEC_EVAL_METHOD is 0, 1, or 2, according to the use of the compiler option
-fpevaldec=_Decimal32 (default), -fpevaldec=_Decimal64
,or
-fpevaldec=_Decimal128, respectively.
It defines the following constants, which may be used to initialize statics and aggregates:
DEC_NAN A quiet NaN (Not-a-Number) value (type _Decimal32).
DEC_INFINITY A positive infinity value (type _Decimal32).
HUGE_VAL_D64 The maximum value (type _Decimal64) representable in the _Decimal64 type
(IEEE positive infinity).
HUGE_VAL_D32 The maximum value (type _Decimal32) representable in the _Decimal32 type
(IEEE positive infinity).
HUGE_VAL_D128 The maximum value (type _Decimal128) representable in the _Decimal128
type (IEEE positive infinity).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010