Someone broke complex arithmetic

Jerry DeLisle jvdelisle@verizon.net
Tue Jul 19 02:55:00 GMT 2005


Steve Kargl wrote:
> 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.
> 
> 
Paul Thomas and I have been looking at a regression with 
large_real_kind_1.f90 also.  This test case comes up as unsupported on 
i686-pc-linux-gnu so it does not run on my machine.  We thought it might 
be due to my patch on IEEE exceptions, but I have found no connection 
there yet.  I was suspecting a recent change in decl.c.

Still investigating.

Jerry



More information about the Fortran mailing list