This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PPC64: First in the series of patches implementing POWER8 vector math.
- From: GT <tnggil at protonmail dot com>
- To: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Mon, 18 Feb 2019 18:30:43 +0000
- Subject: Re: [PATCH] PPC64: First in the series of patches implementing POWER8 vector math.
- References: <7z03WSXwPIOYABvW1ZYzHobMOv90wBWKo-e0YptRFovFUpRnrSEGN-zv08kOe_fPJMFnHx1khbcfcfooubTStEAtMX96Q2U4cRVZOm_TZl8=@protonmail.com> <alpine.DEB.2.21.1902142104290.4022@digraph.polyomino.org.uk>
- Reply-to: GT <tnggil at protonmail dot com>
>
> > +#include <altivec.h>
> > +
> > +vector unsigned long long dHalfPI_t =
> > +{0x3ff921fb54442d18,0x3ff921fb54442d18};
>
> There are namespace problems here. All external constants should have
> names in the implementation namespace, meaning two leading underscores.
> They should also be const; don't add new writable global variables. In
> addition, use vector double and hex floats, rather than writing out the
> integer representation. In addition, each constant should have a comment
> explaining its semantics, sufficiently precisely that someone could
> recompute the value and verify its correctness.
I have addressed all the issues you raised except for one. I haven't been able to locate documentation which explains derivations of corrections to some constants used in the x86_64 code. Corrections to PI when used in repeated FMA operations, and corrections to 1/factorial(n) coefficients in the approximation polynomial.
I put the question of how to obtain these derivations on the mailing list, and am also still looking online for a solution.
May I resubmit the patch or is the lack of clarity regarding these constants a show-stopper?
Thanks.
Bert.