Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2002 18:19:31 -0500 (EST)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        "M. Warner Losh" <imp@village.org>
Cc:        standards@FreeBSD.ORG
Subject:   Re: Floating-point conversions
Message-ID:  <200203142319.g2ENJV888084@khavrinen.lcs.mit.edu>
In-Reply-To: <20020314.124327.57443458.imp@village.org>
References:  <200203141853.g2EIrt385522@khavrinen.lcs.mit.edu> <20020314.124327.57443458.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Thu, 14 Mar 2002 12:43:27 -0700 (MST), "M. Warner Losh" <imp@village.org> said:

> NetBSD has code to support the long double printfs when the magnitude
> of the long double exceeds what can be represented in a double.

The nice feature of David Gay's code is that (a) it's from the same
guy who did our existing __dtoa() implementation, and (b) it not only
implements all of the possible `long double' formats that we might
need (e.g., Intel 80-bit extended-double-precision, Sun 128-bit
quad-precision) but also implements some other formats which -- though
not standardized -- might be useful to make available as a ready-made
solution for certain kinds of applications.

This library supports the following formats:

        f       IEEE single precision
        d       IEEE double precision
        x       IEEE extended precision, as on Intel 80x87
                and software emulations of Motorola 68xxx chips
                that do not pad the way the 68xxx does, but
                only store 80 bits
        xL      IEEE extended precision, as on Motorola 68xxx chips
        Q       quad precision, as on Sun Sparc chips
        dd      double double, pairs of IEEE double numbers
                whose sum is the desired value


The additional strto* functions are all simple wrappers around the
underlying core library, and are in reserved namespace so we're safe
making them available in libc.  The license is BSD-compatible.

-GAWollman


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




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