Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Richard Polton <richard.polton@msdw.com>
To: axp-list@redhat.com
Subject: Re: strange (incorrect) arithmetic behaviour
Date: Tue, 31 Oct 2000 13:42:37 +0000	[thread overview]
Message-ID: <39FECC4D.C6FE215B@msdw.com> (raw)
In-Reply-To: 39FEBED4.DDEF7414@voicenet.com

Indeed. I get that on my Intel, so I am wondering where
the problem lies. Kernel, libc, gcc? Any ideas?

Uncle George wrote:
> 
> I get ( on rh6.2 ) on an xp1000
> 
> -339999995214436424907732413799364296704.000000
> 1.000000
> -339999995214436424907732413799364296704.000000
> 
> Richard Polton wrote:
> 
> > Hi,
> >
> > I have stock RH6.1 on my LX164 machine. When executing the following
> > code I see SIGFPE.
> >
> > #include <stdio.h>
> > #include <math.h>
> >
> > main()
> > {
> >   float a = -3.4e38;
> >   float b = 1.0;
> >   float c = a*b;
> >   printf( "%f\n%f\n%f\n", a, b, c);
> > }
> >
> > In gdb I can see that c contains 2.4e-314 which is not the
> > expected result ;). To compile I use egcs-2.91.66 as supplied with
> > RH6.1 with no additional command line options.
> > What am I missing or doing incorrectly?
> >
> > Thanks,
> >
> > Richard
> >
> > _______________________________________________
> > Axp-list mailing list
> > Axp-list@redhat.com
> > https://listman.redhat.com/mailman/listinfo/axp-list
> 
> _______________________________________________
> Axp-list mailing list
> Axp-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/axp-list




  reply	other threads:[~2000-10-31 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-31 10:17 strange (incorrect) arithmetic behaviour Richard Polton
2000-10-31 12:45 ` Uncle George
2000-10-31 13:42   ` Richard Polton [this message]
2000-10-31 14:37     ` Stefan Schroepfer
2000-10-31 15:38 ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
2000-10-31 22:36 Phil Carmody
2000-11-02 13:35 ` Stefan Schroepfer
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox