This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Aw: Re: TR1 Special Math
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>, Florian Goth <CaptainSifff at gmx dot de>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Nov 2015 12:42:12 +0000
- Subject: Re: Aw: Re: TR1 Special Math
- Authentication-results: sourceware.org; auth=none
- References: <CAH6eHdSK80f08Fr+2gAiX_+QpmfHOgv+-bTtM0DxtVPmRwTykw at mail dot gmail dot com> <554CC2B4 dot 80401 at verizon dot net> <CAH6eHdQ+OkErGe_fXh1k4pzr3vaKUi=XteBu+AymeHCO-iQfDA at mail dot gmail dot com> <562D1571 dot 2070207 at verizon dot net> <CAH6eHdRjG8T9nXkguUzhgjtXGYm9xj+vUnWU+J1yc79OHCqn8A at mail dot gmail dot com> <CAH6eHdQ7gMAzU_OBY5fRXujDQXMqKbSt95QRbFN6UaNjvtZHqw at mail dot gmail dot com> <56460DE2 dot 3050905 at verizon dot net> <56479952 dot 50804 at verizon dot net> <56479C44 dot 4010501 at verizon dot net> <trinity-2724aee0-1bf0-49a2-9a5e-165a8bb4eae9-1447720111375 at 3capp-gmx-bs12> <564A8A31 dot 2070107 at verizon dot net>
On 17/11/15 02:00, Ed Smith-Rowland wrote:
On 11/16/2015 07:28 PM, Florian Goth wrote:
Any particular pointers how I can help in improving the implementation?
Immediately: I have a good patch with xfails where #include <math.h> should inject into namespace std. That's
probably a one liner in the makefiles that's better done in tree. That stuff kills me.
The values checking and NaN checking is very good.
there are several correctness bugs visible in the code.
(e.g. sinc(inf) returning nan instead of 0.)
so at least test all combinations of special numbers
(+-0, +-inf, qnan, and possibly a few other points
including subnormal, small normal large normal input,
this helped me catch corner-case bugs in musl math lib).
it would be nice to know something about the expected
accuracy of these functions (some of them i'd guess
to be hard to implement with low ulp errors).