format (printf like routines)

Rick Genter rgenter at BBN-LABS-B.ARPA
Sat Jul 26 04:20:26 AEST 1986


     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.
--------
Rick Genter 				BBN Laboratories Inc.
(617) 497-3848				10 Moulton St.  6/512
rgenter at labs-b.bbn.COM  (Internet new)	Cambridge, MA   02238
rgenter at bbn-labs-b.ARPA (Internet old)	linus!rgenter%BBN-LABS-B.ARPA (UUCP)



More information about the Comp.lang.c mailing list