mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] casinh function accuracy problem
@ 2020-02-11 15:51 mg1633068
  2020-02-11 19:30 ` Szabolcs Nagy
  0 siblings, 1 reply; 7+ messages in thread
From: mg1633068 @ 2020-02-11 15:51 UTC (permalink / raw)
  To: musl

Hi everyone,
I'm writing testcases for complex math function. Considering the following simple code

#include <stdio.h>
#include <complex.h>
int main(int argc, char *argv[])
{
    double complex d = 3.0+6.6*I;
    double complex ret = casinh(d);
    printf("casinh(3.0+6.6*I)=%.15f+%.15f*I\n", creal(ret), cimag(ret));

    return 0;
}

With musl libc, the result is:
    casinh(3.0+6.6*I)=2.671002221994648+1.140551372972568*I
but with glibc, the result is:
    casinh(3.0+6.6*I)=2.671002221994652+1.140551372972565*I

We can see that musl is less accurate. I'm trying to solve this problem.
With little knowledge of numerical computing, any comment is appreciated!

Thank you in advance!

BR,
Song Yue

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

end of thread, other threads:[~2020-02-12  4:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 15:51 [musl] casinh function accuracy problem mg1633068
2020-02-11 19:30 ` Szabolcs Nagy
2020-02-11 23:24   ` Rich Felker
2020-02-12  0:46     ` Damian McGuckin
2020-02-12  2:00       ` Rich Felker
2020-02-12  4:07         ` Damian McGuckin
2020-02-12  4:19           ` Rich Felker

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