C Reference function tanh()

Usage of tanh():

double tanh(double x);


The value of x has no range.

Return value:

The returned value is in the range of -1 to +1 (inclusive.)

Source code example of tanh():


		double input, output;
		input = log(2.0);
		output = tanh (input);
		printf ("Hyperbolic tangent of %lf is %lf\n", input, output);
		return 0;

Output of the tanh example program above:

	Hyperbolic tangent of 0.693147 is 0.600000

This entry was posted in C Reference math.h Functions. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Tweet This! Tweet This! or use to share this post with others.

Leave a Reply: