Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site allegra.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!jdd From: jdd@allegra.UUCP (John DeTreville) Newsgroups: net.unix-wizards Subject: Re: more sun and vax diffs Message-ID: <2701@allegra.UUCP> Date: Wed, 15-Aug-84 17:36:13 EDT Article-I.D.: allegra.2701 Posted: Wed Aug 15 17:36:13 1984 Date-Received: Thu, 16-Aug-84 03:14:52 EDT References: <12362@sri-arpa.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 30 -------- From: gwyn@BRL-VLD.ARPA Newsgroups: net.unix-wizards Subject: Re: more sun and vax diffs Date: Sun, 19-Aug-84 00:58:24 EDT From: Doug Gwyn (VLD/VMB)It is NOT proper to print "Infinity" in a numeric field that may have to be read back in by another program (even if the Sun scanf() can convert the string back into proper internal form, which I doubt, the output may be shipped to another system to be input). -------- It is my impression that the Sun internally uses the new IEEE standard floating-point format (coming soon to a CPU near you). The IEEE standard reserves a bit-pattern for "infinity", which is returned for operations such as 1.0/0.0 (negative infinity is returned by -1.0/0.0); infinities obey the rules of arithmetic as well as they can. Unfortunately, the C language makes no provision for such things: there is no number which can be printed out for infinity that could possibly be read in as infinity. Does the new C standard address this problem? Cheers, John ("Not Infinite") DeTreville Bell Labs, Murray Hill