From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id D5BFE305E3 for ; Tue, 31 Oct 2000 09:37:24 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id e9VEbOS18271 for axp-list@listman.redhat.com; Tue, 31 Oct 2000 09:37:24 -0500 Received: from scandd1.fhg.de (scandd1.dresden.fhg.de [192.102.167.4]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id e9VEbOD18263 for ; Tue, 31 Oct 2000 09:37:24 -0500 Received: from scandd1.fhg.de (localhost [127.0.0.1]) by scandd1.fhg.de (8.9.3/8.9.3) with ESMTP id PAA11934 for ; Tue, 31 Oct 2000 15:37:22 +0100 (MET) Received: from iis.fhg.de (iis.iis.fhg.de [153.96.172.2]) by scandd1.fhg.de (8.9.3/8.9.3) with ESMTP id PAA11927 for ; Tue, 31 Oct 2000 15:37:22 +0100 (MET) Received: by iis.fhg.de with ESMTP; Tue, 31 Oct 2000 15:37:21 +0100 (MET) from sunserv02.iis.fhg.de Received: from cw025.iis.fhg.de by sunserv02.iis.fhg.de (8.8.8+Sun/SMI-SVR4) id PAA08989; Tue, 31 Oct 2000 15:37:20 +0100 (MET) Received: from iis.fhg.de (localhost [127.0.0.1]) by cw025.iis.fhg.de (8.8.8+Sun/8.8.8) with ESMTP id PAA18099 for ; Tue, 31 Oct 2000 15:37:20 +0100 (MET) Message-ID: <39FED920.35CF7C53@iis.fhg.de> Date: Tue, 31 Oct 2000 15:37:20 +0100 From: Stefan Schroepfer Organization: iis-fhg X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.6 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: strange (incorrect) arithmetic behaviour References: <39FE9C23.7A6CEF2A@msdw.com> <39FEBED4.DDEF7414@voicenet.com> <39FECC4D.C6FE215B@msdw.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors Hi, the f format specifier is for double arguments, so try printf( "%f\n%f\n%f\n", (double)a, (double)b, (double)c); instead. Regards, Stefan Schroepfer Richard Polton wrote: > > Indeed. I get that on my Intel, so I am wondering where > the problem lies. Kernel, libc, gcc? Any ideas? > > Uncle George wrote: > > > > I get ( on rh6.2 ) on an xp1000 > > > > -339999995214436424907732413799364296704.000000 > > 1.000000 > > -339999995214436424907732413799364296704.000000 > > > > Richard Polton wrote: > > > > > Hi, > > > > > > I have stock RH6.1 on my LX164 machine. When executing the following > > > code I see SIGFPE. > > > > > > #include > > > #include > > > > > > main() > > > { > > > float a = -3.4e38; > > > float b = 1.0; > > > float c = a*b; > > > printf( "%f\n%f\n%f\n", a, b, c); > > > }