powd64.3m (2010 09)
p
powd64(3M) powd64(3M)
(HP Integrity Server Only)
NAME
powd64(), powd128(), powd32() - decimal power functions
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal64 powd64(_Decimal64 x, _Decimal64 y);
_Decimal128 powd128(_Decimal128 x, _Decimal128 y);
_Decimal32 powd32(_Decimal32 x, _Decimal32 y);
DESCRIPTION
The powd64() function returns x
y
.
powd128() is a _Decimal128 version of powd64(); it takes
_Decimal128 arguments and returns
a
_Decimal128 result.
powd32() is a _Decimal32 version of powd64(); 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
powd64(±0, y) returns ±infinity and raises the divide-by-zero floating-point exception for y an odd
integer < 0.
powd64(±0, y) returns +infinity and raises the divide-by-zero floating-point exception for y<0 and not
an odd integer.
powd64(±0, y) returns ±0 for y an odd integer > 0.
powd64(±0, y) returns +0 for y>0 and not an odd integer.
powd64(-1, ±infinity) returns 1.
powd64(+1, x) returns 1 for any x, even NaN.
powd64(x, ±0) returns 1 for any x, even NaN.
powd64(x, y) returns NaN and raises the invalid floating-point exception for finite x<0 and finite non-
integer y.
powd64(x, -infinity) returns +infinity for |x|<1.
powd64(x, -infinity) returns +0 for |x|>1.
powd64(x, +infinity) returns +0 for |x|<1.
powd64(x, +infinity) returns +infinity for |x|>1.
powd64(-infinity, y) returns -0 for y an odd integer < 0.
powd64(-infinity, y) returns +0 for y<0 and not an odd integer.
powd64(-infinity, y) returns -infinity for y an odd integer > 0.
powd64(-infinity, y) returns +infinity for y>0 and not an odd integer.
powd64(+infinity, y) returns +0 for y<0.
powd64(+infinity, y) returns +inf for y>0.
Otherwise, if either argument is NaN, then
powd64() returns NaN.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1