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: [PATCH 1/9 v3] Optimized generic expf and exp2f with wrappers


On Fri, 22 Sep 2017, Szabolcs Nagy wrote:

> On 22/09/17 00:44, Joseph Myers wrote:
> > On Tue, 19 Sep 2017, Szabolcs Nagy wrote:
> >> +  /* x = k/N + r with r in [-1/(2N), 1/(2N)] and int k.  */
> >> +  kd = (double) (xd + SHIFT); /* Rounding to double precision is required.  */
> > 
> > Remark (not an issue while this code isn't used for 32-bit x86): a cast 
> > may not achieve that rounding with the default -fexcess-precision=fast so 
> > using this code for 32-bit x86 might require math_narrow_eval here.
> 
> it seems the generated code for i686 happens to be correct
> with gcc-7, but i will add math_narrow_eval if that is
> needed for guaranteed rounding here (in case it later gets
> enabled for i686).

Note that code like this appears in both expf and exp2f, though I only 
mentioned it once in my review.

-- 
Joseph S. Myers
joseph@codesourcery.com


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