From: Stefan Schroepfer <scr@iis.fhg.de>
To: axp-list@redhat.com
Subject: Re: strange (incorrect) arithmetic behaviour
Date: Thu, 02 Nov 2000 14:35:24 +0100 [thread overview]
Message-ID: <3A016D9C.AE603332@iis.fhg.de> (raw)
In-Reply-To: 20001031223623.19927.cpmta@c012.sfo.cp.net
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
next prev parent reply other threads:[~2000-11-02 13:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-31 22:36 strange (incorrect) arithmetic behaviour Phil Carmody
2000-11-02 13:35 ` Stefan Schroepfer [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-10-31 10:17 Richard Polton
2000-10-31 12:45 ` Uncle George
2000-10-31 13:42 ` Richard Polton
2000-10-31 14:37 ` Stefan Schroepfer
2000-10-31 15:38 ` Michal Jaegermann
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox