Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!lll-winken!iggy.GW.Vitalink.COM!widener!ukma!psuvax1!news From: melling@cs.psu.edu (Michael D Mellinger) Newsgroups: comp.lang.c Subject: printf("%g\n", .000010); Message-ID: <6-6H?n&g@cs.psu.edu> Date: 29 May 91 01:53:23 GMT Article-I.D.: cs.6-6H?n&g Sender: news@cs.psu.edu (Usenet) Distribution: comp Organization: Penn State Computer Science Lines: 7 Nntp-Posting-Host: sunws5.sys.cs.psu.edu Is there a way to print numbers less than 10^-4 in decimal notation without trailing zeros? For example, I want printf("%g\n", .000010) to be printed as .00001. %g uses the %e format if numbers are less than 10^-4. -Mike