From: Rich Felker <dalias@libc.org>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>
Cc: musl@lists.openwall.com
Subject: Re: [musl] issue with acoshf
Date: Fri, 5 Feb 2021 11:44:02 -0500 [thread overview]
Message-ID: <20210205164402.GB23432@brightrain.aerifal.cx> (raw)
In-Reply-To: <mwim77oudx.fsf@tomate.loria.fr>
On Fri, Feb 05, 2021 at 08:18:02AM +0100, Paul Zimmermann wrote:
> Hi,
>
> while updating to my comparison of the accuracy of mathematical functions [1],
> I have noticed an issue with acoshf in musl-1.2.2:
>
> $ cat test_acosh_musl.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <math.h>
>
> int
> main (int argc, char *argv[])
> {
> float x = -0x1.1e6ae8p+5;
> float y;
> y = acoshf (x);
> printf ("x=%a y=%a\n", x, y);
> }
>
> With gcc I get NaN as expected:
>
> $ gcc -fno-builtin test_acosh_musl.c -lm
> $ ./a.out
> x=-0x1.1e6ae8p+5 y=-nan
>
> With musl-1.2.2 I get -0x1.2f63acp+3:
>
> $ gcc -fno-builtin test_acosh_musl.c $FILES
> $ ./a.out
> x=-0x1.1e6ae8p+5 y=-0x1.2f63acp+3
>
> Please can someone confirm?
I can't reproduce it on i386 but can on sh w/softfloat. I'm guessing
you're using an arch without its own special definition of sqrtf or
logf, so it looks like it would have to be a bug in the
non-arch-specific version of one of those, but I haven't been able to
reproduce it in isolation just passing the values passed to them
(-0x1.c9b6fcp-7 to logf or 0x1.40330cp+10 to sqrtf) manually building
the generic C versions.
Thanks for the report. I'll keep looking.
Rich
next prev parent reply other threads:[~2021-02-05 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-05 7:18 Paul Zimmermann
2021-02-05 16:44 ` Rich Felker [this message]
2021-02-06 6:45 ` Paul Zimmermann
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=20210205164402.GB23432@brightrain.aerifal.cx \
--to=dalias@libc.org \
--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).