This is the mail archive of the 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] Sparc exp(), expf() performance improvement

On Thu, 3 Aug 2017, Patrick McGehearty wrote:

> > > +extern double __ieee754_exp (double);
> > And this should come through math_private.h.
> I'm not finding it in any math_private.h that I've checked.
> Do you mean I should put it in sysdeps/sparc/fpu/math_private.h?

No.  sysdeps/generic/math_private.h includes math_private_calls.h for each 
floating-point type.  Just #include <math_private.h> and let that arrange 
for the appropriate declarations to be visible.

> > If you're commenting exact representations of floating-point numbers, I'd
> > advise writing them as C99 hex float constants instead of decimal (and
> > then omitting those comments) - generally I think hex float constants are
> > a good idea for any constants that have been computed to have some
> > property (polynomial coefficients, etc.) and can't be expected to be
> > human-readable.
> I agree that C99 hex float constants would be better than decimal, but 
> I'm reluctant to change the formatting of any of the existing constants 
> as it seems an easy opportunity to introduce a possible typo. Even 
> something as simple as transposed digits in one table entry could slip 
> by even extended testing procedures.

All you need to do is compare the generated object files before and after 
the change and make sure they are identical, so the constants have the 
same values in decimal and hex float.

Joseph S. Myers

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