From nobody Mon Sep 25 18:42:51 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvWw3665rz4tvCk for ; Mon, 25 Sep 2023 18:42:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvWw33QvNz3N7c; Mon, 25 Sep 2023 18:42:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTP id 38PIgqrW014821; Mon, 25 Sep 2023 11:42:52 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 38PIgpVq014820; Mon, 25 Sep 2023 11:42:51 -0700 (PDT) (envelope-from sgk) Date: Mon, 25 Sep 2023 11:42:51 -0700 From: Steve Kargl To: Dimitry Andric Cc: Paul Zimmermann , freebsd-hackers@freebsd.org Subject: Re: Accuracy of Mathematical Functions Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Queue-Id: 4RvWw33QvNz3N7c On Mon, Sep 25, 2023 at 08:20:25PM +0200, Dimitry Andric wrote: > On 25 Sep 2023, at 15:50, Paul Zimmermann wrote: > > > > I hope this is not off-topic for this list (Technical discussions relating > > to FreeBSD). > > The freebsd-numerics@ list might have been a better match, but it > receives very low traffic, and the audience on this list will be larger. I suggested Paul post here as numerics@ has had 32 post since 2021 and many of those are due to someone assigning a bug report to numerics. > > We have updated our comparison: > > > > https://members.loria.fr/PZimmermann/papers/accuracy.pdf > > > > This new update includes for the first time the FreeBSD math library, > > whose accuracy is quite good, except: > > > > * single precision: the Bessel functions, lgammaf, cospif, sinpif, tanpif, powf > > * double precision: the Bessel functions, lgammaf, tgammaf, cospi, sinpi, >> tanpi, pow lgammaf and tgammaf are single precision, but it is certainly possible that there are issues. I'll take a look when I have time. >> * double-extended precision: erfcl, lgammal, tgammal, cospil, sinpil, tanpil, >> powl >> >> Some issues have already been fixed in the development version by Steve >> Kargl (we used FreeBSD 13.2). > > Very interesting paper! Of course we are always interested in > improvements for libm, and Steve semi-regularly posts patches in our bug > tracker. (Steve's no longer a committer, but usually these get committed > by others quickly enough.) The issues with half-cycle trig function (i.e., cospi and friends) should be fixed with git 2d3b0a687 on the main branch. It looks like kib merged the patch into stable/13 with git 6fe5d4d8. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272742 -- Steve