complex arc-trig etc

Steve Kargl sgk at troutmask.apl.washington.edu
Sat Dec 29 03:24:15 UTC 2012


On Fri, Dec 28, 2012 at 08:24:52PM -0600, Stephen Montgomery-Smith wrote:
> On 12/17/2012 02:38 AM, Bruce Evans wrote:
> > On Sun, 16 Dec 2012, Stephen Montgomery-Smith wrote:
> > 
> >> Hey guys, my complex arc-trig functions at
> >> http://people.freebsd.org/~stephen/ have been sitting there a long time.
> >> Anyone want to commit them?
> > 
> > I was sort of waiting for the next rounds of changes:
> > 
> > 1. update the template to give similar code for float and long double
> > 2. make it work for i386 using ENTERI()
> 
> What is ENTERI()?
> 

For 'long double' on i386, the precision is
set to 53 bits in the kernel (see the file
sys/x86/include/fpu.h).  ENTERI() toggles
the fpu control word to use 64 bits for 
long double and you use RETURNI() instead
of 'return(val)' to return from the function.
You can see these being used in msun/src/ld80/
s_expl.c.  Also, note the ENTERI() and RETURNI()
are defined in msun/src/math_private.h.

Bruce can probably give a better explanation
and the history.

-- 
Steve


More information about the freebsd-numerics mailing list