Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hi Ed, > ...However, are you seeing a use for it that adds anything to simply using > i2C from PDL::Complex? No. Best regards, Luis -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Ed .
ge.net<mailto:pdl-devel@lists.sourceforge.net>; perldl<mailto:pdl-gene...@lists.sourceforge.net> Subject: Re: [Pdl-devel] PDL 2.027 released Hello, I'm intrigued by ci. What is the reason for its behavior? I found that ci was defined through pp_def with one output argument. Thus, ci+$x is int

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hello, I'm intrigued by ci. What is the reason for its behavior? I found that ci was defined through pp_def with one output argument. Thus, ci+$x is interpreted as ci(+$x) which actually assigns complex i to each element of $x if $x is a complex pdl. If $x is real, then it assigns 0 (I guess it

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Ed .
to:moc...@icf.unam.mx> Sent: 07 March 2021 15:10 To: pdl-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net>; perldl<mailto:pdl-gene...@lists.sourceforge.net> Subject: Re: [Pdl-devel] PDL 2.027 released Hi Ed, > The problem you identified is due to a logic error

Re: [Pdl-devel] PDL 2.027 released

2021-03-07 Thread Luis Mochan
Hi Ed, > The problem you identified is due to a logic error in the bifuncs in P::Ops – > they weren’t handling complex inputs correctly because the code to do so was > behind a check for unsigned-handling. Now that’s corrected, and there’s a > test to guard against regressions. As soon as

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Ed .
-devel@lists.sourceforge.net<mailto:pdl-devel@lists.sourceforge.net>; perldl<mailto:pdl-gene...@lists.sourceforge.net> Subject: Re: [Pdl-devel] PDL 2.027 released Well, so far, I have found that ** invokes the function PDL::power which seems not to work with the new complex types. I don't know the

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
Well, so far, I have found that ** invokes the function PDL::power which seems not to work with the new complex types. I don't know the reason for having both a 'pow' and a 'power' function. On the other hand, would it be feasible to enable data flow back to the real and imaginary parts of a new

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
And pow also works. So it seems the problem is related to the translation from the binary operator version '**'. pdl> p +(1+ci)->ipow(2) 0+2i pdl> p +(1+ci)->pow(2) 1.2246467991473532e-16+2i pdl> p +(1+ci)**2 1+0i pdl> On Sat, Mar 06, 2021 at 05:03:49PM -0600, Luis Mochan wrote: > > So powers

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
> So powers of complex numbers are not working. I haven't looked yet at > the P::Ops code. I'll try later. ipow does work though. -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias

Re: [Pdl-devel] PDL 2.027 released

2021-03-06 Thread Luis Mochan
Hi, On Sat, Mar 06, 2021 at 07:41:18PM +, Ed . wrote: > Dear PDL folks, > I have just uploaded PDL 2.027. Changes from 2.026: Great! I want to start using the new complex code, mostly to avoid the errors due to bad uses of the extra (real-imag) dimension. > - native support for complex

[Pdl-devel] PDL 2.027 released

2021-03-06 Thread Ed .
Dear PDL folks, I have just uploaded PDL 2.027. Changes from 2.026: - native support for complex numbers - thanks Ingo Schmid - define and use C macros in PP for shorter, more comprehensible XS Note that the native complex numbers are as defined in C99, and no attempt has (yet) been made to