Someone broke complex arithmetic
Steve Kargl
sgk@troutmask.apl.washington.edu
Tue Jul 19 02:45:00 GMT 2005
On Mon, Jul 18, 2005 at 07:31:27PM -0700, Steve Kargl wrote:
>
> Here's the output from a program that brought the problem
> to my attention. It uses downward recursion to compute
> spherical Bessel functions.
>
> NAG's F95 compiler
> n x jn(x) jn(cmplx(x,0))
> 0 2.2900E+01 -3.4445E-02 -3.4445E-02 0.0000E+00
> 1 2.2900E+01 2.5337E-02 2.5337E-02 0.0000E+00
> 2 2.2900E+01 3.7765E-02 3.7765E-02 0.0000E+00
> 3 2.2900E+01 -1.7091E-02 -1.7091E-02 0.0000E+00
> 4 2.2900E+01 -4.2989E-02 -4.2989E-02 0.0000E+00
>
gfortran in 4.0.1 gives the correct results shown above.
--
Steve
More information about the Gcc
mailing list