How to compute inverse hyperbolic tangent in C

3 Answers

0 votes
#include <stdio.h>
#include <math.h>

int main(void)
{
    double d = atanh(0.9);

    printf("%lf", d);
}



/*
run:

1.472219

*/

 



answered Jan 26, 2023 by avibootz
0 votes
#include <stdio.h>
#include <math.h>

int main(void)
{
    float f = atanhf(-0.9);

    printf("%f", f);
}



/*
run:

-1.472219

*/

 



answered Jan 26, 2023 by avibootz
0 votes
#include <stdio.h>
#include <math.h>

int main(void)
{
    long double ld = atanhl(0.5);

    printf("%Lf", ld);
}



/*
run:

0.549306

*/

 



answered Jan 26, 2023 by avibootz

Related questions

3 answers 141 views
141 views asked Jan 25, 2023 by avibootz
3 answers 163 views
163 views asked Jan 25, 2023 by avibootz
1 answer 171 views
...