Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: PDL 2.058 released

by syphilis (Archbishop)
on Nov 08, 2021 at 08:28 UTC ( #11138567=note: print w/replies, xml ) Need Help??

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

Hi xiaoyafeng,

Yes, I'm seeing the same errors in relation to %extra and $codestr with PDL-2.059 on perl-5.34.0.
I've just filed a report at


Replies are listed 'Best First'.
Re^3: PDL 2.058 released
by etj (Chaplain) on Nov 08, 2021 at 15:49 UTC
    Unfortunately the line numbers are a bit misleading, and the error is nothing to do with %extra etc. The error is actually happening on a call to log10() when passed a PDL_Byte (unsigned char) and I think PDL_Ushort (unsigned short). I believe it's a compiler/libc bug of some sort.
      In fact, it's due to a new-ish change in GCC-land; on some versions, tgmath (type-generic maths) works fine for log10, but it seems they've changed that. Furthermore, clog10 (the complex version) is actually a GNU extension rather than part of C99, so I've adjusted ops.pd accordingly (and if there's no clog10 available, you can't do log10 on complex numbers, sorry - but it was ever thus).

      I've just released PDL 2.060 which I believe fixes this, so please give it a try.

        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.

      I'm sure it's a compiler/libc bug, but the good news is I'm now able to reproduce it locally, so a fix should be available in due course.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-06-10 07:00 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (37 votes). Check out past polls.