Article View: gnu.gcc.bug
Article #1148Re: floating point accuracy???
From: Mike Stump
Date: Tue, 15 Sep 1992 08:13
Date: Tue, 15 Sep 1992 08:13
36 lines
1311 bytes
1311 bytes
This is a problem with the backend I believe. If it is not, then the
problem in the front-end has been fixed.
On a sun4 I now get:
pow (4,6)= 4096.000000
pow (4,6)= 4096
> Message-Id: <m0mUHwh-000AWzC@sophists.com>
> Date: Mon, 14 Sep 92 11:02 EDT
> From: lewis@sophists.com (Lewis G. Pringle)
> To: bug-gcc@prep.ai.mit.edu
> Reply-To: lewis@sophists.com
> /*
> * I'm not sure if this is a bug, a feature, or a configuration
> * problem, but the results of these math calls were a bit
> * surprising to me.
> *
> * This code we compiled with:
> * gcc -o fred x.cc -lm
> * on a 68k box running a sysVr2.2 variant using gcc 2.2.1.
> *
> * The output was:
> * pow (4,6)= 4096.000000
> * pow (4,6)= 4095
> */
> #include <math.h>
> #include <stdio.h>
> main ()
> {
> printf ("pow (4,6)= %f\n", pow (4,6));
> printf ("pow (4,6)= %d\n", ((unsigned) pow (4,6)));
> }
Technical Details
Message-ID:
<9209150813.AA01007@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrsShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs From: mrs@cygnus.com (Mike Stump) Subject: Re: floating point accuracy??? Message-ID: <9209150813.AA01007@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 15 Sep 1992 08:13:23 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 37