public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Someone broke complex arithmetic
@ 2005-07-19  2:31 Steve Kargl
  2005-07-19  2:45 ` Steve Kargl
  0 siblings, 1 reply; 10+ messages in thread
From: Steve Kargl @ 2005-07-19  2:31 UTC (permalink / raw)
  To: fortran, gcc

This is a heads up.  Someone has broken complex arithmetic
on mainline.  I've just found this problem and unfortunately
it will take me some time to cut the test program down to
something managable.  This could be a gfortran bug or it
may be a middle/back end bug.

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 mainline
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  3.9638E-02  0.0000E+00
2 2.2900E+01  3.7765E-02 -5.0710E-02  0.0000E+00
3 2.2900E+01 -1.7091E-02  7.3035E-02  0.0000E+00
4 2.2900E+01 -4.2989E-02 -1.2032E-01  0.0000E+00

Notice the 3rd column is foobar.

Also note that I'm seeing this problem on i386-*-freebsd and
amd64-*-freebsd.

-- 
Steve

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <42D7F643.2080202@wanadoo.fr>]

end of thread, other threads:[~2005-07-25 10:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-19  2:31 Someone broke complex arithmetic Steve Kargl
2005-07-19  2:45 ` Steve Kargl
2005-07-19  3:02   ` Andrew Pinski
2005-07-19  3:11     ` Steve Kargl
     [not found] <42D7F643.2080202@wanadoo.fr>
     [not found] ` <200507160334.j6G3Yad26764@makai.watson.ibm.com>
     [not found]   ` <42DA8C72.2020207@wanadoo.fr>
     [not found]     ` <200507172119.j6HLJPd26676@makai.watson.ibm.com>
     [not found]       ` <42DAD899.2090403@wanadoo.fr>
     [not found]         ` <200507172332.j6HNWmd27626@makai.watson.ibm.com>
     [not found]           ` <42DB3313.2070707@wanadoo.fr>
     [not found]             ` <200507182101.j6IL1fd27934@makai.watson.ibm.com>
     [not found]               ` <42DC9232.10807@wanadoo.fr>
2005-07-19  7:37                 ` FX Coudert
2005-07-19 17:17                   ` Daniel Berlin
2005-07-19 17:31                     ` Steve Kargl
2005-07-19 18:21                       ` Richard Henderson
2005-07-19 18:32                         ` Steve Kargl
2005-07-25 10:49                   ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).