_encodedecimal64.3m (2010 09)
_
_encodedecimal64(3M) _encodedecimal64(3M)
(HP Integrity Server Only)
NAME
_encodedecimal64(), _encodedecimal128(), _encodedecimal32() - encode decimal-encoded decimal data
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimalencoding64 _encodedecimal64(_Decimal64 x);
_Decimalencoding128 _encodedecimal128(_Decimal128 x);
_Decimalencoding32 _encodedecimal32(_Decimal32 x);
DESCRIPTION
There are two standard bit-encodings for decimal floating-point data: binary and decimal . Both encod-
ings provide exactly the same data (analogous to big endian and little endian encodings). The HP-UX
decimal floating-point types use the binary encoding.
The
_encodedecimal64()
function encodes x as a decimal-encoded 64-bit decimal datum.
_encodedecimal128()
is a _Decimal128 version of
_encodedecimal64()
; it takes a
_Decimal128 argument and returns a _Decimalencoding128
result.
_encodedecimal32()
is a _Decimal32 version of _encodedecimal64(); it takes a
_Decimal32 argument and returns a _Decimalencoding32
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
_encodedecimal64()
returns x in the decimal encoding.
_encodedecimal64()
raises no exceptions.
ERRORS
No errors are defined.
SEE ALSO
_decodebinary64(3M), _decodedecimal64(3M), _encodebinary64(3M), math(5).
STANDARDS CONFORMANCE
These functions are not specified in any standard.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1