MCENANEY WILLIAM J wrote:
> I have two questions. First, if I write, "float reale = 1.0f", is the "f"
> in "1.0f" redundant?
Yes.
It's relevant in expressions, though. E.g. `1.0f * 1.0f' has type
`float', but if you omit either `f' suffix, the other operand will be
promoted to a double, and the result would have type `double'.
> Second, I have heard that the compiler converts would convert reale
> to double precision, because it does that for every variable of the
> type float. Thanks.
Actually, the x86 processors convert everything to 80 bits (IIRC)
internally. If you want the exact same semantics as using IEEE single
or double precision (32 or 64 bits respectively), you need to use the
-ffloat-store option, to force values to be converted to float/double
representation (except that it doesn't seem to work in conjunction
with optimisation on gcc-2.8.*).
--
Glynn Clements <[EMAIL PROTECTED]>