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 9BD81316B4 for ; Tue, 31 Oct 2000 17:36:30 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id e9VMaU620086 for axp-list@listman.redhat.com; Tue, 31 Oct 2000 17:36:30 -0500 Received: from c012.sfo.cp.net (c012-h009.c012.sfo.cp.net [209.228.13.103]) by mail.redhat.com (8.11.0/8.8.7) with SMTP id e9VMaTD20081 for ; Tue, 31 Oct 2000 17:36:29 -0500 Received: (cpmta 19928 invoked from network); 31 Oct 2000 14:36:23 -0800 Date: 31 Oct 2000 14:36:23 -0800 Message-ID: <20001031223623.19927.cpmta@c012.sfo.cp.net> X-Sent: 31 Oct 2000 22:36:23 GMT Received: from [62.236.152.55] by mail.altavista.com with HTTP; 31 Oct 2000 14:36:23 PST Content-Type: text/plain Content-Disposition: inline Mime-Version: 1.0 To: axp-list@redhat.com From: Phil Carmody X-Mailer: Web Mail 3.8.0.10 Subject: Re: strange (incorrect) arithmetic behaviour 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 On Tue, 31 October 2000, Stefan Schroepfer wrote: > 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. 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. Phil Judge Lewis Kaplan's idiocy finally proved August 17, 2000: "Defendants, on the other hand, are adherents of a movement that believes that information should be available without charge to anyone clever enough to break into the computer systems or data storage media in which it is located." _______________________________________________________________________ Free Unlimited Internet Access! Try it now! http://www.zdnet.com/downloads/altavista/index.html _______________________________________________________________________