Path: utzoo!attcan!uunet!jarthur!uci-ics!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Newsgroups: comp.std.c Subject: Re: Questions about NCEG Message-ID: <1990Jun5.024808.14003@twinsun.com> Date: 5 Jun 90 02:48:08 GMT References: <8846@celit.fps.com> <13038@smoke.BRL.MIL> <8924@celit.fps.com> Sender: usenet@twinsun.com Organization: Twin Sun, Inc Lines: 30 Patricia Shanahan writes: A truly logical high level language use of IEEE 754 would have to make explicit allowance for the possibility that "x > y" is neither true nor false, but meaningless because x and y are not ordered relative to each other. In IEEE 754, x>y is always either true or false, and is never ``meaningless''. A high level language can thus treat x>y like any other formula. Granted, x>y differs from !(x<=y) when either x or y is not a number. ... any attempt to extend high level languages to expose IEEE to the user program will have to be inconsistent ... I hope that ``inconsistent'' here does not mean ``logically inconsistent'', because then an implementation could not conform to both ANSI C and IEEE 754. Instead it must mean something like ``inconsistent with what programmers expect''. Not everyone agrees. Let us hope NCEG resolves this for C. ... we use IEEE format floating point, but run by default with all infinity and NaN generating operations trapped, and treat both zero representations as being true zero. This does not conform to IEEE 754, which distinguishes -0 from 0, and in which ``The default response to an exception shall be to proceed without a trap.'' Of course, implementers who feel strongly that a standard is wrong need not conform to it, so long as they do not claim conformance. Implementers can also compromise by supplying compiler options that enable conformance, e.g. GCC's -ansi and -pedantic options.