Programming Reference/Librarys
Question & Answer
Q&A is closed
calculate the complex exponential
#include <stdio.h> #include <complex.h> int main( void ) { double complex z=4.2424 + I*(-2.41231); double result; result = cexp(z); printf("cexp(%f + (%f)*I) = %f + (%f)*I\n",creal(z), cimag(z),creal(result),cimag(result)); return 0; }
cexp(4.242400 + (-2.412310)*I) = -51.878503 + (0.000000)*I