Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
pow, powl
◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
The pow and powl functions compute <x> raised to the power of <y>.
The powl function uses an 80-bit long double form of arguments
and return value. In all other respects, it is identical to pow.
Return Value
The pow and powl functions return the value of <x> raised to the
power of <y>. The result varies, depending on <x> and <y>:
■ If <x> is not 0.0 and <y> is 0.0, the functions return 1.0.
■ If <x> is 0.0 and <y> is negative, the functions set errno to
EDOM and return 0.0.
■ If both <x> and <y> are 0.0, or if <x> is negative and <y> is
not an integer, the functions print a DOMAIN error message to
stderr, set errno to EDOM, and return 0.0.
■ If an overflow results, the functions set errno to ERANGE and
return ±HUGE_VAL (for pow) or ±_LHUGE_VAL (for powl). No
message is printed on overflow or underflow.
The pow function does not recognize integral floating-point values
greater than 2 to the power of 64, such as 1.0E100.
-♦-