long double broken on i386?

David Schultz das at FreeBSD.ORG
Thu Dec 6 13:08:13 PST 2007


On Thu, Dec 06, 2007, Bruce Evans wrote:
> On Wed, 5 Dec 2007, Steve Kargl wrote:
> 
> >On Wed, Dec 05, 2007 at 01:51:32PM -0500, David Schultz wrote:
> 
> >>Having a version that works for machines with the 128-bit floating
> >>point format is pretty important. (These would probably be two
> >>separate files; I've been thinking we should add a msun/ieee96
> >>directory and a msun/ieee128 directory or something.)
> >
> >This is probably a good idea if freebsd wants to maintain the
> >same algorithm across, say, sinf, sin, and sinl.  I can produce
> >code for the ieee128 case, but I have no way to test it.
> 
> I guarantee that it will have bugs if it is not tested :-).

Panther is down, so neither do I unless there's another sparc64
machine in the cluster. I will ask about getting Steve access if
that seems helpful.

> >An alternative may be to use table-driven implementations where
> >the intervals are defined by exactly representable values in ieee96
> >(i.e., 64-bit significand), which are then also exactly representable
> >in ieee128.  I haven't investigated how many intervals one would
> >need nor the best interpolation scheme.
> 
> My best implementation of logl does this to a large extent (see your
> mailbox).  It uses an variable interval length of ~1/128 and rounds the
> endpoints to float precision (endpoints are round(1 + i/128)).  Full
> precision is still needed for the values at the endpoints, but the
> full-precision values are represented as sums of lower-precision
> values to optimize for amd64 and i386.

Yeah, I need to page all of that material back into my brain at
some point. The trouble is I have a gazillion emails, but I don't
have a gazillion minutes of time with which to think about them
and do something about all of them right now.


More information about the freebsd-standards mailing list