modfd64.3m (2010 09)
m
modfd64(3M) modfd64(3M)
(HP Integrity Server Only)
NAME
modfd64(), modfd128(), modfd32() - decompose decimal floating-point numbers
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal64 modfd64(_Decimal64 x, _Decimal64 *iptr);
_Decimal128 modfd128(_Decimal128 x, _Decimal128 *iptr);
_Decimal32 modfd32(_Decimal32 x, _Decimal32 x *iptr);
DESCRIPTION
The modfd64() function breaks the argument x into integral and fractional parts, each of which has the
same sign as the argument. It stores the integral part as a
_Decimal64 in the object pointed to by iptr .
modfd128() is a _Decimal128 version of modfd64(); it takes a
_Decimal128 first argument and
returns a
_Decimal128 result.
modfd32() is a _Decimal32 version of modfd64(); it takes a
_Decimal32 first argument and
returns a
_Decimal32 result.
These math functions are supported for HP-UX 11i Version 3 September 2008 Update and forward.
USAGE
To use any of these functions, compile with the
+decfp option.
Make sure your program defines
__STDC_WANT_DEC_FP__
and then includes <math.h>.
Link in the math library by specifying
-lm or -l:libm.a on the linking command line.
For more information, see the HP-UX floating-point guide for HP Integrity servers at the following site:
http://www.hp.com/go/fp
.
RETURN VALUE
modfd64(x, iptr) returns a result with the same sign as x.
modfd64(±infinity, iptr) returns ±0 and stores ±infinity in the object pointed to by iptr .
modfd64(NaN, iptr) returns NaN and stores NaN in the object pointed to by iptr .
ERRORS
No errors are defined.
SEE ALSO
frexpd64(3M), ldexpd64(3M), truncd64(3M), scalblnd64(3M), scalbnd64(3M), math(5).
STANDARDS CONFORMANCE
These functions conform to ISO/IEC TR 24732, "Extension for the programming language C to support
decimal floating-point arithmetic".
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1