This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5060: Comparisons between double on gcc 2.96
- From: Richard Henderson <rth at redhat dot com>
- To: rodrigc at gcc dot gnu dot org
- Cc: chailan at sand dot cad dot cea dot fr, gcc-bugs at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: Mon, 10 Dec 2001 16:55:44 -0800
- Subject: Re: c++/5060: Comparisons between double on gcc 2.96
- References: <20011210194354.26430.qmail@sources.redhat.com>
On Mon, Dec 10, 2001 at 07:43:54PM -0000, rodrigc@gcc.gnu.org wrote:
> double z = 1.0/i ;
> double o_x = x ;
> x = x + z ;
> printf("i:%g %20.20g %20.20g ", i, z+ o_x, x);
> double q = o_x+z;
> //if( ! (x==(double)(o_x+z))) std::cout <<"HELP!";
Seach for "excess precision" on this list. This is faq.
r~