January 17, 2006 cpow() | ||||
---|---|---|---|---|
| ||||
Also, cpow() does not seem to be working properly. The imaginary part of the result is always zero. For example: -------------------------- #include <complex.h> #include <stdio.h> main() { double complex z1, z2, z3; z1 = 0.1 + 0.2*I; z2 = 0.3 + 0.4*I; z3 = cpow(z1, z2); printf("%f, %f\n", creal(z3), cimag(z3) ); return 0; } -------------------------- The output should be 0.395227, -0.108108 but is instead: 0.395227, 0.000000 -Wes Loewer |
Copyright © 1999-2021 by the D Language Foundation