User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:math.h:tanh
click
to support this page (eg 0,42 € or so) Thanks.

Table of Contents

tanh

    double tanh(double);

Returns hyperbolic tangent of a radian angle x.

C Sourcecode Example

compile with tanh.c -o tanh -lm

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
#include <math.h> /* including math library */
 
int main( void )
{
    double x;
    x = log(42);
    printf ("hyperbolic tangent of 42 is %lf\n", tanh (x) );
    return 0;
}

output

 output:
 user@host:~$ ./tanh 
 hyperbolic tangent of 42 is 0.998867
advertising
c/math.h/tanh.txt · Last modified: 2013/01/22 22:02 (external edit)

Impressum