User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

Q&A is closed



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

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/complex.h/cpow.txt · Last modified: 2013/02/04 12:42 by

Impressum Datenschutz