mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Paul Zimmermann <Paul.Zimmermann@inria.fr>
To: musl@lists.openwall.com
Subject: [musl] issue with sinhf
Date: Fri, 05 Feb 2021 09:01:09 +0100	[thread overview]
Message-ID: <mweehvose2.fsf@tomate.loria.fr> (raw)

       Hi,

a similar issue happens with sinhf:

$ cat test_sinh_musl.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int
main ()
{
  float x = 0x1.62e4p+6;
  float y = sinhf (x);
  printf ("x=%a y=%a\n", x, y);
}

With GNU libc:
$ gcc -fno-builtin test_sinh_musl.c -lm
$ ./a.out
x=0x1.62e4p+6 y=0x1.ffe808p+126

With musl-1.2.2:
$ gcc -fno-builtin test_sinh_musl.c $FILES
$ ./a.out
x=0x1.62e4p+6 y=-nan

Here we get NaN whereas the result is perfectly valid.

Best regards,
Paul

             reply	other threads:[~2021-02-05  8:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05  8:01 Paul Zimmermann [this message]
2021-02-05 20:09 ` Szabolcs Nagy
2021-02-05 20:12   ` Szabolcs Nagy
2021-02-06  6:34     ` Paul Zimmermann
2021-02-06  6:29   ` 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=mweehvose2.fsf@tomate.loria.fr \
    --to=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).