...
This compliant solution can be used if the programmers programmer's intent is was to only take the base-2 logarithm of the real part of the complex number:.
Code Block | ||||
---|---|---|---|---|
| ||||
#include <complex.h> #include <tgmath.h> void func(void) { double complex c = 2.0 + 4.0 * I; double complex result = log2(creal(c)); } |
...