Complex Exponential Integral

Erik Luijten <[email protected]> Tue, 8 Jul 2025 16:21:01 -0500
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <CAM4Pt--NVqqh3PAY2NoC1e9+twGo2U2Q3+S4EBwr1gy4PNZ7fw@mail.gmail.com>
--===============0218468069159915670==
Content-Type: multipart/alternative; boundary="00000000000033193c0639718ae4"

--00000000000033193c0639718ae4
Content-Type: text/plain; charset="UTF-8"

Hi Ethan,

In amos_airy.c, you write:

 * The cexint_() routine is also from the AMOS collection, but is not part
 * of the Bessel function subset and not included in libopenspecfun.
 * I could not find source for a version of the source that splits the
 * real and imaginary parts of the arguments as with the zxxxx.f Bessel
 * routines; this one accepts and returns a CMPLX argument rather than
separate
 * real and imaginary parts.
 *             D. E. Amos, ALGORITHM 683  A Portable FORTRAN Subroutine
 *             for Exponential Integrals of a Complex Argument
 *             ACM Trans. Math. Software 16:178-182 (1990)

This confuses me for two reasons:
- You invoke CEXINT as a double precision function, even though this
Fortran function is single precision.
- The algorithm 683 you quote DOES provide a separate double precision
function, ZEXINT. Moreover, that function does exactly what you were
looking for, namely taking and returning separate real and imaginary parts.

I changed f_amos_cexint to use ZEXINT (just for my own edification) and it
works properly. However, before submitting it, I wonder what am I missing?

Thank you,

Erik

--00000000000033193c0639718ae4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Ethan,<div><br></div><div>In amos_airy.c, you write:<br=
><br>=C2=A0* The cexint_() routine is also from the AMOS collection, but is=
 not part<br>=C2=A0* of the Bessel function subset and not included in libo=
penspecfun.<br>=C2=A0* I could not find source for a version of the source =
that splits the<br>=C2=A0* real and imaginary parts of the arguments as wit=
h the zxxxx.f Bessel<br>=C2=A0* routines; this one accepts and returns a CM=
PLX argument rather than separate<br>=C2=A0* real and imaginary parts.</div=
><div>=C2=A0* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 D. E. Amos, ALGORIT=
HM 683 =C2=A0A Portable FORTRAN Subroutine<br>=C2=A0* =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 for Exponential Integrals of a Complex Argument<br>=C2=
=A0* =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ACM Trans. Math. Software 16=
:178-182 (1990)<br><br></div><div>This confuses me for two reasons:</div><d=
iv>- You invoke CEXINT as a double precision function, even though this For=
tran function is single precision.</div><div>- The algorithm 683 you quote =
DOES provide a separate double precision function, ZEXINT. Moreover, that f=
unction does exactly what you were looking for, namely taking and returning=
 separate real and imaginary parts.</div><div><br></div><div>I changed f_am=
os_cexint to use ZEXINT=C2=A0(just for my own edification) and it works pro=
perly. However, before submitting it, I wonder what am I missing?</div><div=
><br></div><div>Thank you,</div><div><br></div><div>Erik</div></div>

--00000000000033193c0639718ae4--


--===============0218468069159915670==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0218468069159915670==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta

--===============0218468069159915670==--