This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Sparc exp(), expf() performance improvement
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Patrick McGehearty <patrick dot mcgehearty at oracle dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 3 Aug 2017 11:17:18 +0000
- Subject: Re: [PATCH] Sparc exp(), expf() performance improvement
- Authentication-results: sourceware.org; auth=none
- References: <1501529969-96949-1-git-send-email-patrick.mcgehearty@oracle.com> <alpine.DEB.2.20.1707312058070.11716@digraph.polyomino.org.uk> <181b997a-cd10-e600-172d-031d200f2227@oracle.com>
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
joseph@codesourcery.com