From owner-freebsd-stable@FreeBSD.ORG Fri Nov 2 23:15:42 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD8E16A4E2 for ; Fri, 2 Nov 2007 23:15:42 +0000 (UTC) (envelope-from miguel@anjos.strangled.net) Received: from mailrly06.isp.novis.pt (mailrly06.isp.novis.pt [195.23.133.216]) by mx1.freebsd.org (Postfix) with ESMTP id AA88113C4B6 for ; Fri, 2 Nov 2007 23:15:41 +0000 (UTC) (envelope-from miguel@anjos.strangled.net) Received: (qmail 6428 invoked from network); 2 Nov 2007 23:08:44 -0000 Received: from unknown (HELO mailfrt02.isp.novis.pt) ([195.23.133.194]) (envelope-sender ) by mailrly06.isp.novis.pt with compressed SMTP; 2 Nov 2007 23:08:44 -0000 Received: (qmail 1024 invoked from network); 2 Nov 2007 23:08:43 -0000 Received: from unknown (HELO satan.anjos.strangled.net) ([89.181.66.148]) (envelope-sender ) by mailfrt02.isp.novis.pt with SMTP; 2 Nov 2007 23:08:43 -0000 Received: from satan.anjos.strangled.net (localhost [127.0.0.1]) by satan.anjos.strangled.net (8.14.1/8.14.1) with ESMTP id lA2N8ZUg042913; Fri, 2 Nov 2007 23:08:36 GMT (envelope-from miguel@satan.anjos.strangled.net) Received: (from miguel@localhost) by satan.anjos.strangled.net (8.14.1/8.14.1/Submit) id lA2N8YRT042912; Fri, 2 Nov 2007 23:08:34 GMT (envelope-from miguel) Date: Fri, 2 Nov 2007 23:08:34 GMT From: Miguel Lopes Santos Ramos Message-Id: <200711022308.lA2N8YRT042912@satan.anjos.strangled.net> To: petefrench@ticketswitch.com, stable@freebsd.org In-Reply-To: Cc: Subject: Re: Float problen running i386 inary on amd64 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2007 23:15:42 -0000 > From: Pete French > > Hi, I have a very simple program: > > > int > main(int argc, char *argv[]) > { > if(atof("3.2") == atof("3.200")) > puts("They are equal"); > else > puts("They are NOT equal!"); > return 0; > } > > > This works as expected on both i386 and amd64. But if I take the compiled > binary from the i386 system and run it on the amd64 system thenit says they > are not equal! I thought this was a library problem, but it even happens if > I compile to a static binary, which would preseumably mean the same code is > running on both systems. > > I am using 6.3-PRERELEASE here Unfortunately, I didn't have the luck of having it reproduced here. Maybe because my i386 is on 7.0, different compiler (although the amd64 is still on RELENG_6). Since you've rulled out everything else by building a static binary, did you try using the new C99 functions in fenv.h related to the floating-point environment? Miguel Ramos Lisboa, Portugal