Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2005 05:15:47 +1000
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Number of significand bits in long double?
Message-ID:  <20050804191547.GB2104@cirb503493.alcatel.com.au>
In-Reply-To: <20050804162618.GA96657@troutmask.apl.washington.edu>
References:  <20050804162618.GA96657@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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).

See the LDBL_* macros in <float.h> for native precision.

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050804191547.GB2104>