Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > C


HP Integrity Server Only
HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


cpow(), cpowf(), cpowl(), cpoww(), cpowq() — complex power functions


#include <complex.h>

double complex cpow(double complex x, double complex y);

float complex cpowf(float complex x, float complex y);

long double complex cpowl(long double complex x, long double complex y);

extended complex cpoww(extended complex x, extended complex y);

quad complex cpowq(quad complex x, quad complex y);


These functions are available only for Integrity servers.

cpow() returns xy. There is a branch cut for the first parameter along the negative real axis.

cpowf() is a float complex version of cpow(); it takes float complex arguments and returns a float complex result.

cpowl() is a long double complex version of cpow(); it takes long double complex arguments and returns a long double complex result.

cpoww() is an extended complex version of cpow(); it takes a extended complex arguments and returns an extended complex result.

cpowq() is equivalent to cpowl() on HP-UX systems.


To use these functions, compile with the default -Ae option. To use cpoww() or cpowq(), compile with the -fpwidetypes option. Make sure your program includes <complex.h>. Link in the math library by specifying -lm on the compiler or linker command line.


cpow(x,y) returns the value calculated by cexp(y*clog(x)) and raises the exceptions from that calculation, for non-zero y. (The intermediate calculations may be done to greater precision and range.)

cpow(x,±0±i0) returns 1+i0.


No errors are defined.


cpow(), cpowf(), cpowl() : ISO/IEC C99 (including Annex G, ``IEC 60559-compatible complex arithmetic'')

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.