Hi Ed,
On Mon, Jan 13, 2025 at 07:05:38PM +0000, Ed . wrote:
> Glad to hear! By the way, if it's only for the sake of that one function,
> would you like to add it to PDL::Ops, ideally called sqrt_upper, and with the
> Pars typespec of !real and complex-only datatypes? If you'd like to PR that,
> please do, else say and I'll add it myself.
I just did. I didn't use the !real typespec, as the input could be any
numeric type, though the output is complex.
> I don't want to steal your thunder, but it does seem like an actually
> valuable little utility.
I'm glad you find it so. For people that work with wave propagation it
is more common to put a constrain on the imaginary part of complex
square roots than on their real parts, though the usual library sqrt
routines usually return the 'positive' square root, i.e., that with a
positive real part. This has been source of headaches for many
students and colleagues, and for unexpected unphysical results, such
as optical reflectances greater than one, violating energy conservation.
> By the way, would you like to also (or separately) PR a doc update to
> Inline::Pdlpp with how to use it with Inline::Module? Warning, I do think
> that using pptemplate is just better, but it may as well be there for
> completeness.
I'll try that later. My approach worked but only with Perl < 5.40.0. I
read somewhere that many packages have failed after 5.40.0 due to
previously tolerated version errors, with messages that resemble what
I got, but I didn't find where the error was actually located.
Best regards,
Luis
--
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 | [email protected] /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB
_______________________________________________
pdl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-devel