This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]