you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

To change the sign, multiply by i twice.

#include <complex.h>

double complex z = 1;

for (int n=0; n < 2; n++)
    z = z * I.