Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site Shasta.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!decwrl!Glacier!Shasta!mann From: mann@Shasta.ARPA Newsgroups: net.sources.bugs Subject: vc bug -- %g format Message-ID: <7826@Shasta.ARPA> Date: Tue, 27-Aug-85 02:45:37 EDT Article-I.D.: Shasta.7826 Posted: Tue Aug 27 02:45:37 1985 Date-Received: Thu, 29-Aug-85 23:03:52 EDT Distribution: net Organization: Stanford University Lines: 13 I just ran into a bug in the spreadsheet calculator ("vc") that was posted to net.sources a while back. It uses a %g format to print out numbers in several places, in particular when save files are generated. This means that numbers with more than 6 digits of precision get rounded off when you save and reload your spreadsheet, when you use the "e" command, etc. The fix is to replace each occurrence of "%g" in a printf with "%.20g", throughout the program. I can hardly blame the original author of vc for this bug -- the documentation of %g in the printf man page (at least on 4.2BSD) is very misleading. --Tim