Path: 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 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)