User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:complex.h:cpow
click
to support this page (eg 0,42 € or so) Thanks.

cpow

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

description of cpow

calculate the complex power

#include <complex.h>
#include <stdio.h>
 
int main(void)
{
   double complex zd= (double complex) -4.2 + I*4.2;
   double zpowd=(double complex) (long double complex)42.0;
   double result;
 
   result = cpow(zd,zpowd);
   printf("cpow(%f + I*%f,%f + I*%f) = %f\n",creal(zd), cimag(zd), creal(zpowd), cimag(zpowd), result);
   return 0;
}

output of cpow c example

  cpow(-4.200000 + I*4.200000,42.000000 + I*0.000000) = 0.000000
advertising
c/complex.h/cpow.txt · Last modified: 2013/02/04 12:42 by 158.181.88.241

Impressum