How to compute inverse hyperbolic cosine in C

3 Answers

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

int main(void)
{
    double d = acosh(10);
    
    printf("%lf", d);

    return 0;
}



/*
run:

2.993223

*/

 



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

int main(void)
{
    float f = acoshf(1);
    
    printf("%f", f);

    return 0;
}



/*
run:

0.000000

*/

 



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

int main(void)
{
    long double ld = acoshl(0.5);
    
    printf("%Lf", ld);

    return 0;
}



/*
run:

nan

*/

 



answered Jan 25, 2023 by avibootz

Related questions

3 answers 165 views
165 views asked Jan 28, 2023 by avibootz
3 answers 143 views
3 answers 141 views
141 views asked Jan 25, 2023 by avibootz
1 answer 113 views
1 answer 193 views
...