This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][PATCH 0/2] aarch64: Add optimized ASIMD versions of sinf/cosf
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: "Sekhar, Ashwin" <Ashwin dot Sekhar at cavium dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Fri, 23 Jun 2017 11:52:28 +0100
- Subject: Re: [RFC][PATCH 0/2] aarch64: Add optimized ASIMD versions of sinf/cosf
- Authentication-results: sourceware.org; auth=none
- Authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
- Nodisclaimer: True
- References: <20170613071707.43396-1-ashwin.sekhar@caviumnetworks.com> <593FC77A.6050609@arm.com> <1498214948.9165.25.camel@caviumnetworks.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 23/06/17 11:49, Sekhar, Ashwin wrote:
> On Tue, 2017-06-13 at 12:07 +0100, Szabolcs Nagy wrote:
>>
>> - document the worst case ulp error and number of misrounded
>> cases: for single argument scalar functions you can easily test
>> all possible inputs in all rounding modes and that information
>> helps to decide if the algorithm is good enough.
>>
> I have a question on this. In order to calculate the ulp error for all
> possible inputs, I need to compare my implementation against another
> standard implementation.
>
> Is it enough that I compare against the existing sinf implementation in
> glibc or is there any other standard implementation which I can use to
> compare against.
>
no, don't compare it against sinf but against sin.
double precision has enough extra precision to be
a useful oracle for correct results.
(and you may want to compute ulp error in double
precision so you get more precision than just an
integer, but that can be a bit involved because
of special cases around overflow, nan, inf,..)