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 380C230F80 for ; Thu, 2 Nov 2000 08:35:29 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eA2DZT308528 for axp-list@listman.redhat.com; Thu, 2 Nov 2000 08:35:29 -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 eA2DZSD08520 for ; Thu, 2 Nov 2000 08:35:28 -0500 Received: from scandd1.fhg.de (localhost [127.0.0.1]) by scandd1.fhg.de (8.9.3/8.9.3) with ESMTP id OAA22411 for ; Thu, 2 Nov 2000 14:35:27 +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 OAA22405 for ; Thu, 2 Nov 2000 14:35:26 +0100 (MET) Received: by iis.fhg.de with ESMTP; Thu, 2 Nov 2000 14:35:26 +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 OAA20638; Thu, 2 Nov 2000 14:35:25 +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 OAA19462 for ; Thu, 2 Nov 2000 14:35:24 +0100 (MET) Message-ID: <3A016D9C.AE603332@iis.fhg.de> Date: Thu, 02 Nov 2000 14:35:24 +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: <20001031223623.19927.cpmta@c012.sfo.cp.net> 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 Phil Carmody wrote: > > On Tue, 31 October 2000, Stefan Schroepfer wrote: > > Hi, > > > > the f format specifier is for double arguments, > > They were double arguments already, as this is C. In C++ there is no such > automatic promotion, and when you want to pass a float, you simply pass a > float. Automatic promotion in C: oh well I forgot that. If no type promotion takes place you have to cast these values to double. Both Linux and MSVC docs state that the f format specifier is for double values. Some implementation might process float as well, but that's not standard. scr