Mail Archives: pgcc/2000/03/05/23:17:22
did you try using brackets at all???
altho if that was the problem i'd be very surprised.
ie...
static inline mycomplex
zmlt (mycomplex z1, mycomplex z2)
{
mycomplex z;
z.re = (z1.re * z2.re) - (z1.im * z2.im);
z.im = (z1.re * z2.im) + (z1.im * z2.re);
return z;
}
Shoe Lace....
At 06:15 PM 3/1/00 +0900, you wrote:
>Tuukka Toivonen wrote:
> >
> > > I use
> > > pgcc-2.95.2 19991024 (release)
> >
> > Sorry I can't help you. But I wonder if you have noticed the
> > "complex" datatype in GCC? If you want to write ANSI C, you can't use it,
> > but if it's ok to use GCC only, it makes complex calculations much easier.
> >
> > __complex__ double x;
> >
> > main() {
> > x = 1.0 + 3.0i;
> > x = x / (2.0 - 2.0i);
> > printf("%f + %fi\n", __real__ x, __imag__ x);
> > }
> >
>
>Thanks, I know about it.
>
>The piece of code that caused the optimizer bug
>came from a "f2c" 'ed FORTRAN program which
>defines "complex" differently, hence
>my own definition of "mycomplex".
>
>But I think this has nothing to do
>with the optimizer bug, which, by the way,
>seems NOT to present in the mainline gcc 2.95.2
>
>Gerhard
>
>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Gerhard Heinzel e-mail: gerhard DOT heinzel AT nao DOT ac DOT jp
> Space-Time Astronomy Section,
> National Astronomical Observatory, 2-21-1 Ohsawa, Mitaka,
> Tokyo 181-8588, Japan, FAX: 81+422-34-3793, Tel. 81+422-34-3618
> http://tamago.mtk.nao.ac.jp/
>http://users.cybercity.dk/~cis6614/Lucia
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- Raw text -