From: mg1633068 <songyue@smail.nju.edu.cn>
To: musl <musl@lists.openwall.com>
Subject: [musl] casinh function accuracy problem
Date: Tue, 11 Feb 2020 23:51:51 +0800 [thread overview]
Message-ID: <tencent_3FE6CDED4F8BDB5D27463C26@qq.com> (raw)
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
next reply other threads:[~2020-02-11 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 15:51 mg1633068 [this message]
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
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=tencent_3FE6CDED4F8BDB5D27463C26@qq.com \
--to=songyue@smail.nju.edu.cn \
--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).