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 complex? (I understand it may go against their philosophy) pdl> $a=1+2*ci #make a new complex pdl> p $a 1+2i pdl> $b=$a->cimag pdl> p $b 2 pdl> $b.=3 # modifying $b pdl> p $a # doesn't modify the imaginary part of $a 1+2i Best regards, Luis On Sat, Mar 06, 2021 at 05:12:40PM -0600, Luis Mochan wrote: > 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 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 Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ > > Av. Universidad s/n CP 62210 | (*)/\/ \ > > Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ > > GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB > > > > > > _______________________________________________ > > pdl-devel mailing list > > pdl-de...@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pdl-devel > > -- > > o > W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) > Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ > Av. Universidad s/n CP 62210 | (*)/\/ \ > Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ > GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB > > > _______________________________________________ > pdl-devel mailing list > pdl-de...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pdl-devel -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ Av. Universidad s/n CP 62210 | (*)/\/ \ Cuernavaca, Morelos, México | moc...@fis.unam.mx /\_/\__/ GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB _______________________________________________ pdl-general mailing list pdl-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-general