hypotd64.3m (2010 09)

h
hypotd64(3M) hypotd64(3M)
(HP Integrity Server Only)
NAME
hypotd64(), hypotd128(), hypotd32() - decimal Euclidean distance functions
SYNOPSIS
#define __STDC_WANT_DEC_FP__
#include <math.h>
_Decimal64 hypotd64(_Decimal64 x, _Decimal64 y);
_Decimal128 hypotd128(_Decimal128 x, _Decimal128 y);
_Decimal32 hypotd32(_Decimal32 x, _Decimal32 y);
DESCRIPTION
hypotd64() computes the square root of the sum of the squares of x and y, without undue overflow or
underflow.
hypotd128() is a _Decimal128 version of hypotd64(); it takes
_Decimal128 arguments and
returns a
_Decimal128 result.
hypotd32() is a _Decimal32 version of hypotd64(); 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
hypotd64(x, y), hypotd64(y, x), and hypotd64(x,
-y) are equivalent.
hypotd64(x, ±0) is equivalent to fabsd64(x).
hypotd64(±infinity, y) returns +infinity, even if y is NaN.
If one argument is NaN and the other is not ±infinity,
hypotd64() returns NaN.
hypotd64() returns +infinity (or, in some non-default rounding direction modes, the maximum finite
number) in lieu of a value whose magnitude is too large, and raises the overflow and inexact exceptions.
hypotd64() raises the underflow exception whenever a result is tiny (essentially subnormal or zero)
and inexact.
hypotd64() raises the inexact exception whenever a rounded result does not equal the mathematical
result.
ERRORS
If the correct value would overflow,
hypotd64() sets errno to [ERANGE].
SEE ALSO
fabsd64(3M), sqrtd64(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)