Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2005 18:10:36 GMT
From:      David Schultz <das@FreeBSD.ORG>
To:        freebsd-i386@FreeBSD.org
Subject:   Re: i386/67469: src/lib/msun/i387/s_tan.S gives incorrect results for large inputs
Message-ID:  <200502131810.j1DIAaIP037794@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/67469; it has been noted by GNATS.

From: David Schultz <das@FreeBSD.ORG>
To: Bruce Evans <bde@zeta.org.au>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-i386@FreeBSD.ORG,
	bde@FreeBSD.ORG
Subject: Re: i386/67469: src/lib/msun/i387/s_tan.S gives incorrect results for large inputs
Date: Sun, 13 Feb 2005 13:08:37 -0500

 On Mon, Feb 14, 2005, Bruce Evans wrote:
 > It seems that the hardware trig functions aren't worth using.  I want
 > to test them on a 486 and consider the ranges more before discarding
 > them.  This may take a while.
 
 Fair enough.  I would be happy to have a hybrid implementation
 that uses the hardware only when appropriate.  However, your 486
 benchmarks notwithstanding, I would just as soon rely on fdlibm
 entirely for the trig functions.  It just doesn't seem worthwhile
 to me, given that the only parts of the domain where the hardware
 is faster *and* correct are, roughly speaking, [0,2^-28) and
 [pi/4,pi/2-eps].
 
 > I did a quick test of some other functions:
 > - hardware sqrt is much faster
 > - hardware exp is slightly faster on the range [1,100]
 > - hardware atan is slower on the range [0,1.5]
 > - hardware acos is much slower (139 nsec vs 57 nsec!) on the range [0,1.0].
 
 sqrt isn't transcendental, so it should be faster and correctly
 rounded on every hardware platform.  I found similar results to
 yours for atan() and acos() when writing amd64 math routines, but
 of course amd64 has the overhead of switching between the SSE and
 i387 units.  Maybe they should go away, too...



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