Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <mwim77oudx.fsf@tomate.loria.fr>
Date: Fri, 05 Feb 2021 08:18:02 +0100
From: Paul Zimmermann <Paul.Zimmermann@...ia.fr>
To: musl@...ts.openwall.com
Subject: issue with acoshf

       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?

Best regards,
Paul

[1] https://members.loria.fr/PZimmermann/papers/accuracy.pdf

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.