This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/5060: Comparisons between double on gcc 2.96


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]