public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: fortran@gcc.gnu.org, gcc@gcc.gnu.org
Subject: Someone broke complex arithmetic
Date: Tue, 19 Jul 2005 02:31:00 -0000	[thread overview]
Message-ID: <20050719023127.GA88291@troutmask.apl.washington.edu> (raw)

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

             reply	other threads:[~2005-07-19  2:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19  2:31 Steve Kargl [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050719023127.GA88291@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).