#include <math.h> double tanh(double x); float tanhf(float x); long double tanhl(long double x);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
tanhf(), tanhl():
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
|| /* Since glibc 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
tanh(x) = sinh(x) / cosh(x)
x が NaN の場合、NaN が返される。
x が +0 (-0) の場合、+0 (-0) が返される。
x が正の無限大 (負の無限大) の場合、+1 (-1) が返される。
| インターフェース | 属性 | 値 |
| tanh(), tanhf(), tanhl() | Thread safety | MT-Safe |
double 版の関数は SVr4, 4.3BSD, C89 にも準拠している。