This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
divdf3 (Was: Re: RFC: Handling of libgcc symbols in SH shared libraries)
- From: amylaar at spamcop dot net (Joern Rennecke)
- To: kumar107 at rediffmail dot com
- Cc: joern dot rennecke at superh dot com (Joern Rennecke), gcc at gcc dot gnu dot org
- Date: Sun, 15 Aug 2004 17:35:36 +0100 (BST)
- Subject: divdf3 (Was: Re: RFC: Handling of libgcc symbols in SH shared libraries)
> /* 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