Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2002 00:43:42 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        rittle@latour.rsch.comm.mot.com
Cc:        current@FreeBSD.ORG
Subject:   Re: Lack of real long double support
Message-ID:  <20021025.004342.06455314.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>

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




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