Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.02.1903181023100.25032@key0.esi.com.au>
Date: Mon, 18 Mar 2019 10:46:20 +1100 (AEDT)
From: Damian McGuckin <damianm@....com.au>
To: musl@...ts.openwall.com
Subject: Re: Re: atanhf(x) Slight Accuracy Improvements

On Mon, 18 Mar 2019, Szabolcs Nagy wrote:

> if you improve accuracy without performance loss that sounds useful, but 
> i cannot comment on it without seeing the patch.

The main extra load is rather when computing

 	f = 2 * y + (2 * y * y) / (1 - y)

and
 	hfsq = (0.5 * f) * f

it is computed using a slightly different formula and then dissected like 
(f-hfsq) is currently handled in log2.c because of the cancellation error 
seen around sqrt(2), which in this case is when the absolute value 
of the argument 'x', i.e. 'y' from MUSL's atanh.c,, has a value of

 	sqrt(2) - 1
 	-----------
 	sqrt(2) + 1

I need to work on the code because currently it does not conform to the 
normal way MUSL is coded. That is somewhat because the C code was ported 
from a research project which is using the Chapel language and has some 
design consideration which are irrelevant to MUSL, and others which are 
are more limiting than what MUSL has. It might take me a few weeks because 
I have some other work priorities for the next 3 weeks and also need to 
document the research results for the Chapel project first.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.