in reply to Re^4: PDL 2.058 released in thread PDL 2.058 released
2.060 tests fine - but I don't know precisely what it was that changed from the earlier versions of gcc/runtime in relation to log10 - nor whether it was a change for the best, or a bug.
Do you have a simple C script that demonstrates this change ?
Mingw's complex.h includes clog10() beginning with Strawberry's release of perl-5.30.0 (gcc-8.3.0, runtime 6.0), so it should be available to these Windows builds, and onwards.
Cheers, Rob
Re^6: PDL 2.058 released
by etj (Chaplain) on Nov 11, 2021 at 17:45 UTC
|
Earlier GCC, this worked and produced the results you'd expect if (like previous me) you didn't properly understand the C99 tgmath, which then stopped working with more recent GCC:
#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. | [reply] |
|
Earlier GCC, this worked and produced the results you'd expect if (like previous me) you didn't properly understand the C99 tgmath, which then stopped working with more recent GCC:
Thank you for elaborating.
Cheers, Rob
| [reply] |
|