From owner-freebsd-current Thu Oct 24 23:45:20 2002 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 0955E37B401 for <current@FreeBSD.ORG>; Thu, 24 Oct 2002 23:45:19 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 669DF43E42 for <current@FreeBSD.ORG>; Thu, 24 Oct 2002 23:45:18 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9P6jHpk002540; Fri, 25 Oct 2002 00:45:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 25 Oct 2002 00:43:42 -0600 (MDT) Message-Id: <20021025.004342.06455314.imp@bsdimp.com> To: rittle@latour.rsch.comm.mot.com Cc: current@FreeBSD.ORG Subject: Re: Lack of real long double support From: "M. Warner Losh" <imp@bsdimp.com> In-Reply-To: <200210240833.g9O8XB1W033884@latour.rsch.comm.mot.com> References: <20021020025400.GA13776@xor.obsecurity.org> <20021023123653.A39814@espresso.q9media.com> <200210240833.g9O8XB1W033884@latour.rsch.comm.mot.com> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: <freebsd-current.FreeBSD.ORG> List-Archive: <http://docs.freebsd.org/mail/> (Web Archive) List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions) List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-current> List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-current> X-Loop: FreeBSD.ORG In message: <200210240833.g9O8XB1W033884@latour.rsch.comm.mot.com> Loren James Rittle <rittle@latour.rsch.comm.mot.com> writes: : Yet, the FP hardware is actually configured by default to provide : `long double' as: : : #define LDBL_MANT_DIG 53 : #define LDBL_MIN_EXP (-16381) : #define LDBL_MAX_EXP 16384 : : Indeed, FP code using long double generated by gcc 2.95.X, installed : as the FreeBSD 4 system compiler, uses the full exponent range of : -16381 to 16384. However, printf(), etc loses on that exponent range : and reports Inf. I suspect this is why the system header misreports : the FP hardware, thus the header describes the largest printable long : double value, not the largest that could be held in a calculation. I have patches to fix these constants, but not to fix printf, and co, to really support the full precision of long double. Even NetBSD doesn't do that. : Anyways, two questions for FreeBSD maintainers. How should gcc, as : provided from the FSF, describe the long double FP format for : FreeBSD/i386 4.x? Shall we assume that no changes for FreeBSD 5.x : will occur? No. You should assume that for i386, at least, that long double will have the right LDBL_ constants. I've had them in my local tree for about 3 months now and just haven't found the time to commit to -current. I'll find the time right now. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message