EXAMPLE
Your C-compiler can work with complex numbers if it supports the C99 standard. Link with -lm. The imaginary unit is represented by I.
/* check that exp(i*pi) == -1 */
#include <math.h> /* for atan */
#include <complex.h>
main() {
double pi = 4*atan(1);
complex z = cexp(I*pi);
printf("%f+%f*i\n", creal(z), cimag(z));
}
"SEE ALSO"
cabs(3), carg(3), cexp(3), cimag(3), creal(3)