Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,907 questions

51,839 answers

573 users

How to use acosh() function to get the arc hyperbolic cosine value of N in C

2 Answers

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

int main(int argc, char **argv)
{
	printf("acosh(1.2) = %.6f\n", acosh(1.2));
 
    double ac = acos(.9);
	printf("acos(.9) = %.6f\n", ac);

	return 0;
}

/*
run:

acosh(1.2) = 0.622363
acos(.9) = 0.451027

*/ 

 



answered Mar 12, 2016 by avibootz
0 votes
#include <stdio.h>     
#include <math.h>
#include <float.h>

int main(int argc, char **argv)
{
	printf("acosh(1) = %.6f\n", acosh(1));
	printf("acosh(0) = %.6f\n", acosh(0));
	printf("acosh(10) = %.6f\n", acosh(10));
	printf("acosh(0.5) = %.6f\n", acosh(0.5));
	printf("acosh(DBL_MAX) = %.6f\n", acosh(DBL_MAX));
	printf("acosh(INFINITY) = %.6f\n", acosh(INFINITY));

	return 0;
}

// 1.#QNAN0 = Quiet NaNs (qNaNs) do not raise any additional exception
// "NAN" is "not-a-number" - applies to float and double

/*
run:

acosh(1) = 0.000000
acosh(0) = 1.#QNAN0
acosh(10) = 2.993223
acosh(0.5) = 1.#QNAN0
acosh(DBL_MAX) = 710.475860
acosh(INFINITY) = 1.#QNAN0

*/ 

 



answered Mar 12, 2016 by avibootz
...