Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!caip!brl-adm!brl-smoke!smoke!rbj@icst-cmr.ARPA From: rbj@icst-cmr.ARPA (Root Boy Jim) Newsgroups: net.lang.c Subject: Re: format (printf like routines) Message-ID: <2574@brl-smoke.ARPA> Date: Fri, 25-Jul-86 15:29:51 EDT Article-I.D.: brl-smok.2574 Posted: Fri Jul 25 15:29:51 1986 Date-Received: Sat, 26-Jul-86 05:34:38 EDT Sender: news@brl-smoke.ARPA Lines: 26 With respect to 10**38 being inaccurate: Geoff is correct. Since 10 is not a power of two, to represent 10**38 exactly *does* require many many bits of mantissa (89 to be exact). *However*, on the VAX, thanks to hardware magic like guard digits, a loop of 38 "* 10.0"s *does* yield the exact representation of 10**38 within the constraints of a (double). A subsequent loop of 38 "/ 10.0"s even gives you 1.0. Perhaps I should have made myself clear. IEEE format does not require that every integer in it's range be represented exactly. I do agree that 10**38 requires something like 89 bits, but 10**38 - 1 requires more, something on the order of 126 bits. Even with Cray 128 bit doubles, some of the bits have to go to the exponent, so it can't represent all the integers in its range either. Rick Genter BBN Laboratories Inc. (617) 497-3848 10 Moulton St. 6/512 rgenter@labs-b.bbn.COM Cambridge, MA 02238 rgenter@bbn-labs-b.ARPA linus!rgenter%BBN-LABS-B.ARPA (UUCP) (Root Boy) Jim Cottrell A can of ASPARAGUS, 73 pigeons, some LIVE ammo, and a FROZEN DAQUIRI!! ... ... cannot represent it either.