--- Comment #17 from kargl at gcc dot gnu dot org 2009-12-19 19:45 ---
Closing as won't fix. Currently, gfortran produces nan + i nan for
finite-complex / 0 or finite-complex / (0,0) with its FE constanting
folding and when the middle-end generates code. The Fortran standard
does not p
--- Comment #16 from ghazi at gcc dot gnu dot org 2009-12-18 17:16 ---
(In reply to comment #15)
> Now that MPC is required by gcc, I'll take a look
> at making gfortran give a consistent result when
> comparing its constant folding with generated code.
BTW, I put in some special-case c
--- Comment #15 from sgk at troutmask dot apl dot washington dot edu
2009-12-18 15:52 ---
Subject: Re: Complex division by zero in gfortran returns wrong results
On Fri, Dec 18, 2009 at 02:42:15PM -, pault at gcc dot gnu dot org wrote:
>
> Do you want to suspend this PR or to jun
--- Comment #14 from pault at gcc dot gnu dot org 2009-12-18 14:42 ---
Hi guys!
Do you want to suspend this PR or to junk it?
Let's get it out of the unconfirmed list.
Thanks
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40318
--- Comment #13 from ghazi at gcc dot gnu dot org 2009-06-02 15:16 ---
(In reply to comment #11)
> What is disturbing is Example 2 in G.5.1 on page 470! Does gcc's runtime
> implementation of complex division mirror Example 2? I can understand
> the need to avoid under/overflow, but _C
--- Comment #12 from burnus at gcc dot gnu dot org 2009-06-01 20:33 ---
> Oh yuck. I just checked n1124.pdf In Annex G.5.1, it explicitly
> defines this behavior:
Note: Annex G is "only" informative and not normative; still it makes probably
sense to follow the informative parts of a
--- Comment #11 from sgk at troutmask dot apl dot washington dot edu
2009-06-01 19:16 ---
Subject: Re: Complex division by zero in gfortran returns wrong results
On Mon, Jun 01, 2009 at 06:14:52PM -, ghazi at gcc dot gnu dot org wrote:
>
> - Comment #10 from ghazi at gcc dot
--- Comment #10 from ghazi at gcc dot gnu dot org 2009-06-01 18:14 ---
(In reply to comment #9)
> If MPC returns inf or (inf + i inf) and the MPC developers do not consider
> this to be a bug in their library, then gfortran will need to handle the
> division by zero during constant foldi
--- Comment #9 from sgk at troutmask dot apl dot washington dot edu
2009-06-01 14:56 ---
Subject: Re: Complex division by zero in gfortran returns wrong results
On Mon, Jun 01, 2009 at 08:35:05AM -, ghazi at gcc dot gnu dot org wrote:
>
>
> --- Comment #2 from ghazi at gcc d
--- Comment #8 from jb at gcc dot gnu dot org 2009-06-01 14:21 ---
Whatever you do, as long as the Fortran standard is silent on this matter, can
you hide it behind some -fC99-wankery or such option and not enable it by
default, so that those of us who care less about which of (NaN, NaN)
--- Comment #7 from dominiq at lps dot ens dot fr 2009-06-01 12:25 ---
> Then this is the gist of the matter - my FA textbook does not require the
> argument to converge, but just the modulus, so our understandings of infinity
> differ.
Think of something like \rho\exp(i\rho\sin(\pi\rh
--- Comment #6 from dennis dot wassel at googlemail dot com 2009-06-01
12:14 ---
(In reply to comment #3)
> My understanding of infinity in the complex plane is what is called (I
> call?) "directed inifinity": if abs((a,b)) goes to +Inf and atan2(a,b) has
> a defined value in this lim
--- Comment #5 from dominiq at lps dot ens dot fr 2009-06-01 11:24 ---
(In reply to comment #2)
> Does fortran follow a standard here we can compare against
> or are we guessing? :-)
What the fortran standard says is "you shall not divide by zero"! anything else
is just a matter of cho
--- Comment #4 from burnus at gcc dot gnu dot org 2009-06-01 11:09 ---
Regarding the run-time evaluation, note that Fortran sets (internally) the
-fcx-fortran-rules flag, which modifies the complex evaluation.
--
burnus at gcc dot gnu dot org changed:
What|Removed
--- Comment #3 from dominiq at lps dot ens dot fr 2009-06-01 10:19 ---
In http://gcc.gnu.org/ml/fortran/2009-06/msg6.html, Dennis Wassel
wrote:
> Complex numbers have a well-defined concept of infinity, which I like to
> visualise as the "infinite-diameter" ring around the finite co
--- Comment #2 from ghazi at gcc dot gnu dot org 2009-06-01 08:35 ---
(In reply to comment #1)
> Kaveh,
> After looking into the problem, I think (nan + i nan) is
> an acceptable result for z = (-0.1,-2.2)/(0.0,0.0)
> because of the standard definition of complex division.
> For z2 = (0
--- Comment #1 from kargl at gcc dot gnu dot org 2009-06-01 06:54 ---
(In reply to comment #0)
> Complex division by zero in gfortran returns NaN. This is expected for 0/0,
> but other finite/zero should return Inf. This impacts the testcase
> gfortran.dg/real_const_3.f90 in two values
17 matches
Mail list logo