Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2002 08:36:32 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        "M. Warner Losh" <imp@village.org>
Cc:        wollman@lcs.mit.edu, <tim@robbins.dropbear.id.au>, <freebsd-standards@FreeBSD.ORG>
Subject:   Re: standards/36783
Message-ID:  <20020416082602.D5869-100000@gamplex.bde.org>
In-Reply-To: <20020412.123734.61861702.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 12 Apr 2002, M. Warner Losh wrote:

> In message: <200204121822.g3CIM4491247@khavrinen.lcs.mit.edu>
>             Garrett Wollman <wollman@lcs.mit.edu> writes:
> : <<On Fri, 12 Apr 2002 12:16:45 -0600 (MDT), "M. Warner Losh" <imp@village.org> said:
> :
> : > This is no longer true.  Long doubles can and do give better precision
> : > than doubles, but at a high performance cost.
> :
> : Is GCC now emitting code to change the rounding mode from 53-bit to
> : 80-bit whenever it works with long doubles?

gcc-2.9x doesn't.

> I haven't looked at the generated code, but I think so.  I've been
> able to get better precision from long doubles than doubles in
> experimental code. (eg, 1 + epsilon allows me a smaller epsilon with
> long double than double).

At least on i386's, you would have to change FreeBSD's default rounding
mode yourself (or run a Linux binary :-) for (1 + DBL_EPSILON / 2) to
be different from 1).  Changing the default may cause small errors and
library math functions, not to mention printf(), since the library
doesn't really support long doubles and may require plain double
precision to work precisely.

Bruce


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?20020416082602.D5869-100000>