mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] issue with sinhf
@ 2021-02-05  8:01 Paul Zimmermann
  2021-02-05 20:09 ` Szabolcs Nagy
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Zimmermann @ 2021-02-05  8:01 UTC (permalink / raw)
  To: musl

       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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-06  6:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05  8:01 [musl] issue with sinhf Paul Zimmermann
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

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).