From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20227 invoked by alias); 29 Jul 2002 22:36:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20210 invoked by uid 71); 29 Jul 2002 22:36:01 -0000 Date: Mon, 29 Jul 2002 15:36:00 -0000 Message-ID: <20020729223601.20209.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Geoff Keating Subject: Re: c/7437: Identical unsigned int calculations differ by 1, depending on number of steps in calculation. Reply-To: Geoff Keating X-SW-Source: 2002-07/txt/msg00777.txt.bz2 List-Id: The following reply was made to PR c/7437; it has been noted by GNATS. From: Geoff Keating To: sewell@dramail.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: c/7437: Identical unsigned int calculations differ by 1, depending on number of steps in calculation. Date: 29 Jul 2002 15:33:55 -0700 This is covered in the manual: * On 68000 and x86 systems, for instance, you can get paradoxical results if you test the precise values of floating point numbers. For example, you can find that a floating point value which is not a NaN is not equal to itself. This results from the fact that the floating point registers hold a few more bits of precision than fit in a `double' in memory. Compiled code moves values between memory and floating point registers at its convenience, and moving them into memory truncates them. You can partially avoid this problem by using the `-ffloat-store' option (*note Optimize Options::). -- - Geoffrey Keating