From owner-freebsd-standards Fri Apr 12 21: 8:43 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 37FCF37B419 for ; Fri, 12 Apr 2002 21:08:40 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3D48di18120; Fri, 12 Apr 2002 22:08:39 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3D48Yc55724; Fri, 12 Apr 2002 22:08:34 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 12 Apr 2002 22:08:26 -0600 (MDT) Message-Id: <20020412.220826.123419371.imp@village.org> To: tim@robbins.dropbear.id.au Cc: freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 From: "M. Warner Losh" In-Reply-To: <20020413135358.A9710@treetop.robbins.dropbear.id.au> References: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> <20020413135358.A9710@treetop.robbins.dropbear.id.au> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020413135358.A9710@treetop.robbins.dropbear.id.au> "Tim J. Robbins" writes: : On Fri, Apr 12, 2002 at 12:16:45PM -0600, M. Warner Losh wrote: : : > This is no longer true. Long doubles can and do give better precision : > than doubles, but at a high performance cost. printf can't print a : > long double more precisely than what double can represent, however, : > since printf casts it to a double first. : : This sounds like something that needs to get documented in printf(3), then : eventually fixed (I can't think of an elegant way to fix it right now). A co-worker has fixes in his tree, but he's not happy enough with them yet to have me commit them. He got them from NetBSD. : What I'll do is leave the format string the same as for a double, and : make a note explaining that it was working around a printf limitation. : Thanks for the info. I don't understand this. You print doubles with %f and long doubles with %Lf. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message