divdf3 (Was: Re: RFC: Handling of libgcc symbols in SH shared libraries)
Joern Rennecke
amylaar@spamcop.net
Sun Aug 15 18:01:00 GMT 2004
> /* y = 1/x ; x (- [1,2)
> y0 = 1.5 - x/2 - tab[(1-x)*64] = y + d ; abs(d)/y <= 1/256
>
> y1 = y0 - ((y0) * x - 1) * y0 = y-x*d^2
> y2 = y1 - ((y1) * x - 1) * y0 = y-x*d^4
>
> z0 = y2*x ; x1 = x - z0*x /* 32 * 64 bit */
> z1 = y2*x1 (round to nearest odd 0.5 ulp);
> x2 = x1 - z1*x
>
> z = x/y = z0 + z1 - 0.5 ulp + (x2 > 0) * ulp
Sorry, I got the variable names muddled up. The
last lines shoud rather read:
z0 = y2*a ; a1 = a - z0*x /* 32 * 64 bit */
z1 = y2*a1 (round to nearest odd 0.5 ulp);
a2 = a1 - z1*x
z = a/x = z0 + z1 - 0.5 ulp + (a2 > 0) * ulp
More information about the Gcc
mailing list