Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^6: PDL 2.058 released

by etj (Chaplain)
on Nov 11, 2021 at 17:45 UTC ( #11138734=note: print w/replies, xml ) Need Help??


in reply to Re^5: PDL 2.058 released
in thread PDL 2.058 released

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.

Replies are listed 'Best First'.
Re^7: PDL 2.058 released
by syphilis (Archbishop) on Nov 11, 2021 at 21:35 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:

    Thank you for elaborating.

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138734]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2023-06-09 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (35 votes). Check out past polls.

    Notices?