From: Damian McGuckin <damianm@esi.com.au>
To: musl@lists.openwall.com
Subject: Re: Re: atanhf(x) Slight Accuracy Improvements
Date: Mon, 18 Mar 2019 10:46:20 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LRH.2.02.1903181023100.25032@key0.esi.com.au> (raw)
In-Reply-To: <20190317230729.GQ26605@port70.net>
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
prev parent reply other threads:[~2019-03-17 23:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 11:18 Damian McGuckin
2019-03-15 1:24 ` Damian McGuckin
2019-03-17 11:41 ` Damian McGuckin
2019-03-17 23:07 ` Szabolcs Nagy
2019-03-17 23:46 ` Damian McGuckin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LRH.2.02.1903181023100.25032@key0.esi.com.au \
--to=damianm@esi.com.au \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).