Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!ucsd!ucbvax!van-bc!ubc-cs!alberta!bode!eric From: eric@bode.ee.ualberta.ca (Eric Norum,EB 547,4626) Newsgroups: comp.sys.next Subject: Re^2: printf bug Message-ID: <70@bode.ee.ualberta.ca> Date: 5 Jul 90 20:44:13 GMT Reply-To: eric@bode.ee.ualberta.ca (Eric Norum) Organization: University of Alberta Electrical Engineering Lines: 19 Looks like there were a couple of problems with my article describing what I believe to be a bug in printf. 1. I don't know how the reply field got trashed. The reply field should have been: eric@bode.ee.ualberta.ca 2. I didn't state my problem clearly enough. The bug is in the way the `%g' format of the C printf function handles floating point numbers with exponents between -1 and -4, inclusive. My comments about gnuplot were confusing. It was when working with gnuplot that I discovered the problem with printf. Summary: on the NeXT: printf ("%.3g\n", 0.0001234); prints 0, and I think it should print 0.000123 Eric Norum Dept. of Electrical Engineering eric@bode.ee.ualberta.ca University of Alberta Edmonton, Canada. phone: (403) 492-4626