From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16903 invoked by alias); 1 Feb 2002 19:16:03 -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 16801 invoked by uid 71); 1 Feb 2002 19:16:01 -0000 Resent-Date: 1 Feb 2002 19:16:01 -0000 Resent-Message-ID: <20020201191601.16799.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, murph@winface.com Received:(qmail 15562 invoked by uid 61); 1 Feb 2002 19:12:59 -0000 Message-Id:<20020201191259.15561.qmail@sources.redhat.com> Date: Fri, 01 Feb 2002 11:16:00 -0000 From: murph@winface.com Reply-To: murph@winface.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/5574: "http://ego.uwaterloo.ca/SpamGate?ip=216.94.64Off by two error produced by gcc -o test sqr.c -lm X-SW-Source: 2002-02/txt/msg00027.txt.bz2 List-Id: >Number: 5574 >Category: other >Synopsis: "http://ego.uwaterloo.ca/SpamGate?ip=216.94.64Off by two error produced by gcc -o test sqr.c -lm >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Feb 01 11:16:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: murph@winface.com >Release: Most gcc 2.9X >Organization: >Environment: Most Linux on Intel systems. >Description: The program: #include stdio.h #include math.h; main() { register i; double f=0.0; double sqrt(); for(i=0;i<=1000000000;i++) { f+=sqrt( (double) i); } printf("Finished %20.14f\n",f); } compiled on linux as: gcc -o test sqr.c -lm typically produces: 21081851083598.38281250000000 but compiling as: gcc -march=i686 -O3 -lm -o test sqr.c yeilds: 21081851083600.38281250000000 which is closer to the right answer by exactly 2.0. See: http://www.winface.com/sqrc_results.html for more info. >How-To-Repeat: See: http://www.winface.com/sqrc_results.html for more info. >Fix: >Release-Note: >Audit-Trail: >Unformatted: