This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: IBM long double fixes


On Sun, Jun 30, 2013 at 03:35:22PM +0000, Joseph S. Myers wrote:
> On Tue, 25 Jun 2013, Alan Modra wrote:
> 
> > diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
> > index b599f36..c5fc1e2 100644
> > --- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c
> > +++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
> 
> >  	  static const double
> >  	    two54 = 1.80143985094819840000e+16, /* 4350000000000000 */
> >  	    twom54 = 5.55111512312578270212e-17; /* 3C90000000000000 */
> > -	  ex2_u.dd[1] *= two54;
> > -	  ex2_u.ieee.exponent2 += n_i >> unsafe;
> > -	  ex2_u.dd[1] *= twom54;
> > +	  ex2_u.d[1].d *= two54;
> > +	  ex2_u.d[0].ieee.exponent += n_i >> unsafe;
> 
> The old code was setting exponent2, which I believe corresponds to 
> d[1].ieee.exponent not d[0].ieee.exponent.

Oops.  Thanks!  Fixed, and double checked all the other mechanical
changes.

-- 
Alan Modra
Australia Development Lab, IBM


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