--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20434
--- Additional Comments From tkoenig at gcc dot gnu dot org 2005-07-07
09:14 ---
This appears to be fixed now in mainline:
$ cat complex-parts.c
#include
#include
int main()
{
float cr,ci;
float complex c;
foo(&cr,&ci);
c = cr+I*ci;
return crealf(c)+cimagf(c)<0;
}
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-12
23:13 ---
(In reply to comment #6)
> Well the real reason is creal/cimag returns double and not float.
> Use crealf/cimagf instead.
You're right, of course. Doing that gets me
:
foo (&cr, &ci);
return cr +
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-12
18:07 ---
(In reply to comment #5)
> Again, the as-if rule: If a and b are floats, the expression
> a+b < 0 should be the same for any a and b regardless wether they
> are done in float or double.
Well the real reas
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-12
09:45 ---
(In reply to comment #4)
> (In reply to comment #3)
> > > > - Why the casts to double?
> > > Because that is required by the C standard.
> >
> > Isn't that covered by the as-if rule? I'm fairly
> > sur
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-11
22:55 ---
(In reply to comment #3)
> > > - Why the casts to double?
> > Because that is required by the C standard.
>
> Isn't that covered by the as-if rule? I'm fairly
> sure the cast to double won't change the res
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-11
22:49 ---
> > - Why the casts to double?
> Because that is required by the C standard.
Isn't that covered by the as-if rule? I'm fairly
sure the cast to double won't change the result of
the "<" operator :-)
--
--- Additional Comments From pinskia at physics dot uc dot edu 2005-03-11
22:41 ---
Subject: Re: pessimization of complex expression
On Mar 11, 2005, at 4:59 PM, Thomas dot Koenig at online dot de wrote:
>
> --- Additional Comments From Thomas dot Koenig at online dot de
> 2005
On Mar 11, 2005, at 4:59 PM, Thomas dot Koenig at online dot de wrote:
--- Additional Comments From Thomas dot Koenig at online dot de
2005-03-11 21:59 ---
There are two strange things here:
- Why the + 0. ?
- Why the casts to double?
Because that is required by the C standard.
-- Pinski
--- Additional Comments From Thomas dot Koenig at online dot de 2005-03-11
21:59 ---
There are two strange things here:
- Why the + 0. ?
- Why the casts to double?
--
What|Removed |Added
--
10 matches
Mail list logo