From owner-freebsd-current@FreeBSD.ORG Thu Aug 4 19:30:46 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 364B116A41F for ; Thu, 4 Aug 2005 19:30:46 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD90B43D49 for ; Thu, 4 Aug 2005 19:30:45 +0000 (GMT) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.13.4/8.13.4) with ESMTP id j74JUZmd098003; Thu, 4 Aug 2005 12:30:35 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.13.4/8.13.1/Submit) id j74JUUas098002; Thu, 4 Aug 2005 12:30:30 -0700 (PDT) (envelope-from sgk) Date: Thu, 4 Aug 2005 12:30:30 -0700 From: Steve Kargl To: Peter Jeremy Message-ID: <20050804193030.GA97987@troutmask.apl.washington.edu> References: <20050804162618.GA96657@troutmask.apl.washington.edu> <20050804191547.GB2104@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050804191547.GB2104@cirb503493.alcatel.com.au> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org Subject: Re: Number of significand bits in long double? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2005 19:30:46 -0000 On Fri, Aug 05, 2005 at 05:15:47AM +1000, Peter Jeremy wrote: > On Thu, 2005-Aug-04 09:26:18 -0700, Steve Kargl wrote: > >Can someone confirm or refute that the long double type > >has 53 bits in its significand on i386? Which header > >file in /usr/include provides this info? > > A long double on an i386 is 64 bits by default. The FP initialisation > code in FreeBSD sets rounding precision to double so that only 53 bits > are available. You can override this in userland with fpsetprec() (but > note this may adversely impact on the accuracy of some libm functions). fpsetprec is deprecated. In addition, one finds "... fpsetprec() functions provide functionality unavailable on many platforms. At present, they are implemented only on the i386 and amd64 platforms". > See the LDBL_* macros in for native precision. That's the problem. The LDBL* macros misrepresent the actual precision used. -- Steve