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 sinh() function to get the hyperbolic sine of an angle of N radians in C++

1 Answer

0 votes
#include <iostream>
#include <cmath>

using namespace std;

#define PI 3.14159265

int main()
{
	cout << "sinh(PI / 6) = " << sinh(PI / 6) << endl;
	cout << "sinh(PI / 2) = " << sinh(PI / 2) << endl;
	cout << "sinh(PI / 180) = " << sinh(PI / 180) << endl;
	cout << "sinh(-2 * PI / 4) = " << sinh(-2 * PI / 4) << endl;
	cout << "sinh(+0) = " << sinh(0.0) << endl;
	cout << "sinh(-0) = " << sinh(-0.0) << endl;
	cout << "sinh(+1) = " << sinh(1.0) << endl;
	cout << "sinh(-1) = " << sinh(-1.0) << endl;
	cout << "sinh(log(2.0)) = " << sinh(log(2.0)) << endl;

	return 0;
}

/*
run:

sinh(PI / 6) = 0.547853
sinh(PI / 2) = 2.3013
sinh(PI / 180) = 0.0174542
sinh(-2 * PI / 4) = -2.3013
sinh(+0) = 0
sinh(-0) = -0
sinh(+1) = 1.1752
sinh(-1) = -1.1752
sinh(log(2.0)) = 0.75

*/

 



answered Mar 30, 2016 by avibootz
...