remainderd64.3m (2010 09)

r
remainderd64(3M) remainderd64(3M)
(HP Integrity Server Only)
NAME
remainderd64(), remainderd128(), remainderd32() - decimal remainder functions
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal64 remainderd64(_Decimal64 x, _Decimal64 y);
_Decimal128 remainderd128(_Decimal128 x, _Decimal128 y);
_Decimal32 remainderd32(_Decimal32 x, _Decimal32 y);
DESCRIPTION
The remainderd64()
function determines the remainder r = x ny when y is a nonzero number. The
value n is the integral value nearest the exact value x/y; when n x/y =⁄
1
2
, the value n is chosen to be
even.
The
remainderd64()
function is independent of the decimal rounding mode.
remainderd128()
is a _Decimal128 version of remainderd64()
; it takes _Decimal128 argu-
ments and returns a
_Decimal128 result.
remainderd32() is a _Decimal32
version of remainderd64(); it takes _Decimal32 arguments
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
If y is ±infinity and x is not ±infinity,
remainderd64()
returns x.
If x is ±0 and y is a nonzero number,
remainderd64()
returns x.
If y is 0,
remainderd64()
returns NaN and raises the invalid exception.
If x is ±infinity,
remainderd64()
returns NaN and raises the invalid exception.
If x or y is NaN,
remainderd64()
returns NaN.
ERRORS
If x is ±infinity or y is 0,
remainderd64() sets errno to [EDOM].
SEE ALSO
fabsd64(3M), fmodd64(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

Summary of content (2 pages)