#include <tgmath.h>
void main() {
complex double z = 1.0;
z = log10(z);
printf("%f%+fi\n", creal(z), cimag(z));
}
See https://en.cppreference.com/w/c/numeric/tgmath for more. Note log10 is in the "real-only" section; GCC incorporated it into their "real or imag" tgmath for a while incorporating their own clog10 extension, but then evidently changed their minds. The presence or absence of clog10 is not relevant to log10 working or not with tgmath. In reply to Re^6: PDL 2.058 released
by etj
in thread PDL 2.058 released
by etj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |