Article View: comp.std.c
Article #1981Re: floating point constant folding
From: John F Carr
Date: Wed, 14 Nov 1990 19:22
Date: Wed, 14 Nov 1990 19:22
17 lines
1223 bytes
1223 bytes
In article <1990Nov13.174025.1520@zoo.toronto.edu>
henry@zoo.toronto.edu (Henry Spencer) writes:
>Observable results include overflow exceptions and the values
>of data items written out to files.
Overflows of types other than unsigned integers are undefined, so a
conforming compiler could rearrange float expressions that would
overflow in the target machine's floating point format. The standard
allows calculations to be in greater precision than the types involved.
In practice, this means if the compiler simplifies floating point
expressions involving constants, it must use the target float format,
or a format with more bits than the target (both range and precision
must be at least as great as the target).
--
John Carr (jfc@athena.mit.edu)
Technical Details
Message-ID:
<1990Nov14.192231.29728@athena.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker.mit.edu!bloom-beacon!jfcReferences:
<8191@star.cs.vu.nl> <1990Nov13.174025.1520@zoo.toronto.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker.mit.edu!bloom-beacon!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.std.c Subject: Re: floating point constant folding Message-ID: <1990Nov14.192231.29728@athena.mit.edu> Date: 14 Nov 90 19:22:31 GMT References: <8191@star.cs.vu.nl> <1990Nov13.174025.1520@zoo.toronto.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: Massachusetts Institute of Technology Lines: 17