From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14527 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dan Gohman Newsgroups: gmane.linux.lib.musl.general Subject: new exp fails erfc in libc-test Date: Wed, 7 Aug 2019 17:47:54 -0700 Message-ID: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000028dbcc058f906903" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65047"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14543-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 08 02:48:23 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hvWbO-000Gn6-Cp for gllmg-musl@m.gmane.org; Thu, 08 Aug 2019 02:48:22 +0200 Original-Received: (qmail 1981 invoked by uid 550); 8 Aug 2019 00:48:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1943 invoked from network); 8 Aug 2019 00:48:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mozilla.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=qWLPOJWlve6xKMLNlWN39XOyOubnajQXCIPW0uWaQ0E=; b=MAbR72psOtPITAU1jUdfN+/IYzQvD/TW4JG+6zU2B0605vR8y1coQWFSXaqrMk+puX tSPiOXJ9u572HR/CoEDauJBYFg/gYvllXrijr3G256L2fZBxtyOYlxslfXFxLj50q9kS Pl06H6ncyQGWdq+GUuz44Sf58I7XRHNQcPsn8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=qWLPOJWlve6xKMLNlWN39XOyOubnajQXCIPW0uWaQ0E=; b=QTVhPLcIxuyt74U+jny1hJKUngE+ZZDUxAdwHFMj9ZEx1J23f69IkAu1oMFYTqmOni Qu0G4AW0m54iKp6l7kKhDcMP3rDCGhbsKh+0KSqcBhLw1nTbjzpWmsznWZYEInBKZtHJ Wd4FpKyXJjd6O/gtt0/qeEpvwW35WMKCNrAXQZVea1YEmBcM2GGX5EWyLyHmARxqRFcf A5g/mHzl75arnAqZKS0mW4A1X3MbJZDqIFyW7VSM271cPjHzd9WdPO7rvSTKBybR7H2y dS73cfR25mLIf8EOiux2cO3pWlJm4yfEq4pay658VYkSucVoqGS7jiAMQKdp5rGW+rgk UOvA== X-Gm-Message-State: APjAAAXwMdcHyZFJYfIgo8kq6z0TgHmo3opXWp/RphhR0jWOkid83pEP K6cn/PwUxFmDt6m/QZoURG0G/fzyXI/lnACiDP8Io06Fzck= X-Google-Smtp-Source: APXvYqzojEWdjr+UYN8joDo8nDBzCyCLKchlUc7sepDGMAeVEU5naAY36ZKyX7cKxhasWhti8eWuTAysOam5aCZirxU= X-Received: by 2002:a5d:948f:: with SMTP id v15mr11489413ioj.93.1565225285890; Wed, 07 Aug 2019 17:48:05 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:14527 Archived-At: --00000000000028dbcc058f906903 Content-Type: text/plain; charset="UTF-8" As of the patch which introduced the new exp implementations: http://git.musl-libc.org/cgit/musl/commit/?id=e16f7b3c02e17d0ace779a11f0d53a9c05fdd434 I am seeing a test failure in the erfc test in libc-test on at least x86-64 (erfc calls exp internally): src/math/special/erfc.h:6: RN erfc(0x1.5db559fe5c0bap+0) want 0x1.b53cf571d328fp-5 got 0x1.b53cf571d328cp-5 ulperr -2.609 = -0x1.8p+1 + 0x1.900982p-2 Please let me know if there's any other information which would be useful. Dan --00000000000028dbcc058f906903 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
As of the patch which introduced the new exp implemen= tations:




--00000000000028dbcc058f906903-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14528 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: new exp fails erfc in libc-test Date: Wed, 7 Aug 2019 21:46:06 -0400 Message-ID: <20190808014606.GE9017@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="21729"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14544-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 08 03:46:22 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hvXVW-0005YR-4N for gllmg-musl@m.gmane.org; Thu, 08 Aug 2019 03:46:22 +0200 Original-Received: (qmail 25956 invoked by uid 550); 8 Aug 2019 01:46:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 25934 invoked from network); 8 Aug 2019 01:46:19 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14528 Archived-At: On Wed, Aug 07, 2019 at 05:47:54PM -0700, Dan Gohman wrote: > As of the patch which introduced the new exp implementations: > > http://git.musl-libc.org/cgit/musl/commit/?id=e16f7b3c02e17d0ace779a11f0d53a9c05fdd434 > > I am seeing a test failure in the erfc test in libc-test on at least x86-64 > (erfc calls exp internally): > > src/math/special/erfc.h:6: RN erfc(0x1.5db559fe5c0bap+0) want > 0x1.b53cf571d328fp-5 got 0x1.b53cf571d328cp-5 ulperr -2.609 = -0x1.8p+1 + > 0x1.900982p-2 > > Please let me know if there's any other information which would be useful. I think errors on this order of magnitude are considered normal for the transcendental functions. Is there something you're concerned will break due to the difference in accuracy here, or are you asking if it's potentially something you should be concerned about? Rich From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14529 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dan Gohman Newsgroups: gmane.linux.lib.musl.general Subject: Re: new exp fails erfc in libc-test Date: Thu, 8 Aug 2019 06:15:40 -0700 Message-ID: References: <20190808014606.GE9017@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005c9ab8058f9adbbe" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="126215"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14545-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 08 15:16:08 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hviH2-000Wju-EA for gllmg-musl@m.gmane.org; Thu, 08 Aug 2019 15:16:08 +0200 Original-Received: (qmail 21644 invoked by uid 550); 8 Aug 2019 13:16:04 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 21626 invoked from network); 8 Aug 2019 13:16:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mozilla.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=WkHYGtQ8o3kopDaFO27KaQ1mpheHS0lZeU9oqrXNrZU=; b=AoYFP4G4cTk4QtQkM/oGvM6un/Ht/hP9FyEqjRkrwHgK1RfFfdW/w30GO54Ga5jZpp HliVJGtFvvOfsoaFJHUESAIfG/5xQPe7aUcAUpMDoFPyrgY7mOxKMqGjrk1csuumcuhC VhX1j9ZDLzr+dbvO9tMxZKkC4P5riCAm0yiNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=WkHYGtQ8o3kopDaFO27KaQ1mpheHS0lZeU9oqrXNrZU=; b=OI6BCG0LhEij+2CvMnl8qECm+MqwwGnZgHr1ZEjSi9kKuWQBcuOyLaoQ12WDaXQa3W CjDBLJJ8awLk/GSx1RkOoX+x0wuzDseRcKuS300BMZWSA+RLKDcFbWtqgZCXiEOKPYZA 97yNGwL9spO3RCQRSZsvOZI7JcbHo4lQM3zMeqQwd9CixOo6WxTakxhvkXpsmcXreyKe vqEL2tKkRnHnqAPO+5/3NmY/9J9/vnxGpSizhmek3xRMYQsfHHZjXax6UPbErUvjjW8g /BDNK9DAhJ2lW6fKXTZPN6ojJnmC+wxJkiA9LTBpWKs2ms5xD4yHUjKBA/kuGNNPipkp hAHA== X-Gm-Message-State: APjAAAVlM5aZtF4RxqsbYKp6EiRGmz1L7sioaFIfJjv0Lw9O4peOv9k5 BfG8o1Oafh92v+TXSriFITGVJF+Pczo1F+qqGy2twrP6 X-Google-Smtp-Source: APXvYqw98axwwjPMaw5Lv2+allBqt3oiQ33CdMDbPnztzM2SOUmb/fOWxVRp7VC0nnYlOQjvhAW2WUXUquliL2+gpMs= X-Received: by 2002:a02:c492:: with SMTP id t18mr16701590jam.67.1565270151559; Thu, 08 Aug 2019 06:15:51 -0700 (PDT) In-Reply-To: <20190808014606.GE9017@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14529 Archived-At: --0000000000005c9ab8058f9adbbe Content-Type: text/plain; charset="UTF-8" On Wed, Aug 7, 2019 at 6:46 PM Rich Felker wrote: > I think errors on this order of magnitude are considered normal for > the transcendental functions. Is there something you're concerned will > break due to the difference in accuracy here, or are you asking if > it's potentially something you should be concerned about? > I'm just reporting a nominal regression I observed. If the finding is the test is too narrow, that's fine with me. Dan --0000000000005c9ab8058f9adbbe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think errors on this order of magnitude are considered normal for
the transcendental functions. Is there something you're concerned will<= br> break due to the difference in accuracy here, or are you asking if
it's potentially something you should be concerned about?

I'm just reporting a nominal regression I observ= ed. If the finding is the test is too narrow, that's fine with me.
<= /div>

Dan

--0000000000005c9ab8058f9adbbe-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14531 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: new exp fails erfc in libc-test Date: Thu, 8 Aug 2019 20:11:58 +0200 Message-ID: <20190808181158.GG22009@port70.net> References: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="72170"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-14547-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 08 20:12:15 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hvmtZ-000Ich-8V for gllmg-musl@m.gmane.org; Thu, 08 Aug 2019 20:12:13 +0200 Original-Received: (qmail 6130 invoked by uid 550); 8 Aug 2019 18:12:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 6112 invoked from network); 8 Aug 2019 18:12:09 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:14531 Archived-At: * Dan Gohman [2019-08-07 17:47:54 -0700]: > As of the patch which introduced the new exp implementations: > > http://git.musl-libc.org/cgit/musl/commit/?id=e16f7b3c02e17d0ace779a11f0d53a9c05fdd434 > > I am seeing a test failure in the erfc test in libc-test on at least x86-64 > (erfc calls exp internally): > > src/math/special/erfc.h:6: RN erfc(0x1.5db559fe5c0bap+0) want > 0x1.b53cf571d328fp-5 got 0x1.b53cf571d328cp-5 ulperr -2.609 = -0x1.8p+1 + > 0x1.900982p-2 > > Please let me know if there's any other information which would be useful. erfc in this range returns exp(a)*exp(b)/x which is R(R(R(exp(a)) * R(exp(b))) / x) where R is the round to nearest operation. each rounding may introduce about eps/2 relative error so about 2eps error overall. 1 eps relative error translates to 1..2 ulp error, so 4 ulp error bound in this case, but in practice the actual worst case is likely closer to 3 ulp for this expression. this analysis assumes a correctly rounded exp and exact a and b, so this algorithm cannot be expected to have < 2.6ulp error, no matter what exp is used. so i guess i will just have to update the error threshold in the erfc test. btw the new exp algorithm happens to be correctly rounded on the input that is used during that test, while the old algorithm is off by one.