mailing list of musl libc
 help / color / mirror / Atom feed
* [musl] Accuracy of Mathematical Functions in Single, Double, and Quadruple Precision
@ 2020-12-04 16:37 Paul Zimmermann
  2020-12-04 17:21 ` Szabolcs Nagy
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Zimmermann @ 2020-12-04 16:37 UTC (permalink / raw)
  To: musl

       Hi,

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.

If something changes in future versions, please tell me so that I can revise
my note.

Best regards,
Paul Zimmermann

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [musl] Accuracy of Mathematical Functions in Single, Double, and Quadruple Precision
  2020-12-04 16:37 [musl] Accuracy of Mathematical Functions in Single, Double, and Quadruple Precision Paul Zimmermann
@ 2020-12-04 17:21 ` Szabolcs Nagy
  0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2020-12-04 17:21 UTC (permalink / raw)
  To: Paul Zimmermann; +Cc: musl

* 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-04 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 16:37 [musl] Accuracy of Mathematical Functions in Single, Double, and Quadruple Precision Paul Zimmermann
2020-12-04 17:21 ` Szabolcs Nagy

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/musl

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 musl musl/ http://inbox.vuxu.org/musl \
		musl@inbox.vuxu.org
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.musl


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/musl/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git