Floating point output
Donald Lewine
lewine at dg-rtp.dg.com
Fri Aug 31 03:12:10 AEST 1990
In article <3295 at skye.ed.ac.uk>, jeff at aiai.ed.ac.uk (Jeff Dalton) writes:
|> In May 13 1988 draft (sorry, it's the only one I have), X3J11/88-90,
|> it says:
|>
|> A strictly conforming program ... shall not produce output
|> dependent on any unspecified, undefined, or implementation-
|> defined behavior. [Section 1.7, page 4]
|>
|> Since the representations of floating types are unspecified,
|> what, if any, output of fp numbers is allowed in strictly
|> conforming programs?
Section 4.9.6.1 describes the fprintf() conversions for %f, %e, %E,
%g and %G. They produce well defined output.
NOTE: It is possible to have a strictly conforming application which
produces machine specific, non-portable output. If your
program writes an array of double out with fwrite() and reads
it back with fread(), the program may be conforming and
portable even though the data is machine specific.
This file is not an "output" of the program.
--------------------------------------------------------------------
Donald A. Lewine (508) 870-9008 Voice
Data General Corporation (508) 366-0750 FAX
4400 Computer Drive. MS D112A
Westboro, MA 01580 U.S.A.
uucp: uunet!dg!lewine Internet: lewine at cheshirecat.webo.dg.com
More information about the Comp.std.c
mailing list