From: Szabolcs Nagy <nsz@port70.net>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Accuracy of Mathematical Functions in Single, Double, and Quadruple Precision
Date: Fri, 4 Dec 2020 18:21:12 +0100 [thread overview]
Message-ID: <20201204172112.GR1370092@port70.net> (raw)
In-Reply-To: <mwpn3pbk7s.fsf@tomate.loria.fr>
* Paul Zimmermann <Paul.Zimmermann@inria.fr> [2020-12-04 17:37:59 +0100]:
> I have published a new version of my note, including results for double and
> quadruple precision, and also for bivariate functions (atan2, hypot, pow):
>
> https://homepages.loria.fr/PZimmermann/papers/#accuracy
>
> With Musl 1.2.1, the largest error I found in double precision is 14 ulps,
> except for the Bessel functions and the lgamma function.
bessel functions and lgamma have large errors at least near zeros,
and those would be hard to fix and i don't think we care enough to
work on them, (but patches are welcome). the generalized bessel
functions are also a denial of service attack vector (unlikely to
be relevant in practice, but that's a more significant issue than
the accuracy at zeros, all other math functions are real-time robust:
worst-case computation latency is reasonably bounded, although trig
arg reduction code could be improved in this area).
tgamma was known to have >5 ulp errors, the code was mainly optimized
to be small and simple.
exp10 has a simple naive implementation, 4 ulp is not surprising there,
we can fix this if needed (but it's a non-standard function).
erfc is good old fdlibm code, 3 ulp is ok, but i think it can be
fixed if split into more intervals (and likely made faster too if
the divisions are avoided and only polynomial approximation is used).
the rest is < 3 ulp error and the most important functions are < 1 ulp
which looks reasonable to me.
> If something changes in future versions, please tell me so that I can revise
> my note.
ok.
prev parent reply other threads:[~2020-12-04 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 16:37 Paul Zimmermann
2020-12-04 17:21 ` Szabolcs Nagy [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=20201204172112.GR1370092@port70.net \
--to=nsz@port70.net \
--cc=Paul.Zimmermann@inria.fr \
--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).