mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Ruinland ChuanTzu Tsai <ruinland@andestech.com>
To: <musl@lists.openwall.com>
Cc: <alankao@andestech.com>
Subject: math/powf regression on d28cd0ad commit
Date: Wed, 4 Dec 2019 10:10:45 +0800	[thread overview]
Message-ID: <20191204021045.GA10870@APC301.andestech.com> (raw)

Hi musl fellows,
sorry for making the noise again.

Yet I encountered a regression of libc-test's math/powf on x86_64 and
RV64 during the transitions from v1.1.22 to v1.1.23. After bisecting, I
managed to locate the commit that breaks powf() test to be d28cd0ad ,
which introduces a new implementation of powf().

Fail log is shown as follow :

src/math/ucb/powf.h:103: bad fp exception: RU powf(0x1.fffffep+127,0x1p+0)=0x1.fffffep+127, want 0 got INEXACT|OVERFLOW 
X src/math/ucb/powf.h:530: bad fp exception: RN powf(0x1.fffff8p-127,0x1p+0)=0x1.fffff8p-127, want 0 got INEXACT|UNDERFLOW
X src/math/ucb/powf.h:533: bad fp exception: RN powf(0x1.fffffcp-127,0x1p+0)=0x1.fffffcp-127, want 0 got INEXACT|UNDERFLOW
X src/math/ucb/powf.h:719: bad fp exception: RN powf(-0x1.fffff8p-127,0x1p+0)=-0x1.fffff8p-127, want 0 got INEXACT|UNDERFLOW
X src/math/ucb/powf.h:722: bad fp exception: RN powf(-0x1.fffffcp-127,0x1p+0)=-0x1.fffffcp-127, want 0 got INEXACT|UNDERFLOW
FAIL ./src/math/powf.exe [status 1]

I took a quick investigation on the RU powf(0x1.fffffep+127,0x1p+0).
In the very end of powf() , a "y", which is a little bit larger than the
expected outcome, gets passed to eval_as_float(). Since we're rounding-
up, it will become an INF, causing the testcase to fail.

It makes me wonder whether the old implementation is safe enough for
someone to revert this change by her/his own ? ( I reverted the change
for testing. It seems to be side-effect free ? )

Best regards,
Ruinland


             reply	other threads:[~2019-12-04  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04  2:10 Ruinland ChuanTzu Tsai [this message]
2019-12-04  9:33 ` Szabolcs Nagy

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=20191204021045.GA10870@APC301.andestech.com \
    --to=ruinland@andestech.com \
    --cc=alankao@andestech.com \
    --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).