tanh() — 쌍곡 탄젠트 계산

형식

#include <math.h>
double tanh(double x);

언어 레벨

ANSI

스레드세이프

설명

tanh() 함수는 x의 쌍곡 탄젠트를 계산합니다. 여기서 x는 라디안으로 표현됩니다.

리턴값

tanh() 함수는 x의 쌍곡 탄젠트 값을 리턴합니다. tanh()의 결과는 범위 오류를 포함할 수 없습니다.

이 예는 x를 π⁄4의 쌍곡 탄젠트로 계산합니다.
#include <math.h>
#include <stdio.h>
 
int main(void)
{
   double pi, x;
 
   pi = 3.1415926;
   x = tanh(pi/4);
 
   printf("tanh( %lf ) = %lf\n", pi/4, x);
}
 
/******************  Output should be similar to:  ****************
 
tanh( 0.785398 ) = 0.655794
*/