From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7778 invoked by alias); 5 Apr 2004 11:11:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7740 invoked by uid 48); 5 Apr 2004 11:11:17 -0000 Date: Mon, 05 Apr 2004 11:11:00 -0000 From: "gonnetp at inf dot ethz dot ch" To: gcc-bugs@gcc.gnu.org Message-ID: <20040405111100.14850.gonnetp@inf.ethz.ch> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/14850] New: -ffloat-store and -mieee-fp aren't doing what I assume they should do X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg00405.txt.bz2 List-Id: I am trying to compute the IEEE-754 unit of least precision (ulp) for 64-bit double precision numbers on an IA-32 machine with the following C-code: int main ( int argc , char *argv ) { double d, eps; printf("Unit of Least Precision:\n"); d = 1.0; eps = 0.5; while (1.0 + eps/2 > 1.0) eps /= 2; printf("ulp = %20.16e\n\n",eps); } Compiling with gcc-3.3.1 using gcc -O0 -ffloat-store -mieee-fp ieee.c I get the output Unit of Least Precision: ulp = 1.0842021724855044e-19 meaning that my program is using the extra bits despite the "-ffloat-store" and "-mieee-fp" options. Is this correct? Using the Intel C Compiler v. 7.1 and compiling with icc -pc64 -O0 ieee.c I get the correct result Unit of Least Precision: ulp = 2.2204460492503131e-16 Is there an option to gcc that forces the use of IEEE-754 64-bit operations as in the Intel compiler? If not, is there any way to set this behaviour by hand? Cheers and thanks Pedro -- Summary: -ffloat-store and -mieee-fp aren't doing what I assume they should do Product: gcc Version: 3.3.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gonnetp at inf dot ethz dot ch CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14850