Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tanh(3) [v7 man page]

TANH(3) 						     Linux Programmer's Manual							   TANH(3)

NAME
tanh, tanhf, tanhl - hyperbolic tangent function SYNOPSIS
#include <math.h> double tanh(double x); float tanhf(float x); long double tanhl(long double x); Link with -lm. Feature Test Macro Requirements for glibc (see feature_test_macros(7)): tanhf(), tanhl(): _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE DESCRIPTION
These functions return the hyperbolic tangent of x, which is defined mathematically as: tanh(x) = sinh(x) / cosh(x) RETURN VALUE
On success, these functions return the hyperbolic tangent of x. If x is a NaN, a NaN is returned. If x is +0 (-0), +0 (-0) is returned. If x is positive infinity (negative infinity), +1 (-1) is returned. ERRORS
No errors occur. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +-------------------------+---------------+---------+ |Interface | Attribute | Value | +-------------------------+---------------+---------+ |tanh(), tanhf(), tanhl() | Thread safety | MT-Safe | +-------------------------+---------------+---------+ CONFORMING TO
C99, POSIX.1-2001, POSIX.1-2008. The variant returning double also conforms to SVr4, 4.3BSD, C89. SEE ALSO
acosh(3), asinh(3), atanh(3), cosh(3), ctanh(3), sinh(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 TANH(3)

Check Out this Related Man Page

sinh(3) 						     Library Functions Manual							   sinh(3)

NAME
sinh, cosh, tanh - Hyperbolic functions LIBRARY
Math Library (libm.a) SYNOPSIS
#include <math.h> double sinh (double x); float sinhf (float x); long double sinhl (long double x); double cosh (double x); float coshf (float x); long double coshl (long double x); double tanh (double x); float tanhf (float x); long double tanhl (long double x); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: cosh(): XPG4 sinh(): XPG4 tanh(): XPG4 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The sinh(), sinhf(), and sinhl() functions compute the hyperbolic sine of x. Both sinh(x), sinhf(x), and sinhl(x) are defined as (exp(x) - exp(-x))/2. The cosh(), coshf(), and coshl() functions compute the hyperbolic cosine of x. Both cosh(x), coshf(x), and coshl(x) are defined as (e**x + e**(-x))/2. The tanh(), tanhf(), and tanhl() functions compute the hyperbolic tangent of x. Both tanh(x), tanhf(x), and tanhl(x) are defined as (e**x - e**(-x))/(e**x + e**(-x)). The following table describes function behavior in response to exceptional arguments: -------------------------------------------------------------------- Function Exceptional Argument Routine Behavior -------------------------------------------------------------------- sinh(), sinhf(), sinhl() |x|>ln(2 * max_float) Overflow cosh(), coshf(), coshl() |x|>ln(2 * max_float) Overflow -------------------------------------------------------------------- The following table lists boundary values used by these functions: --------------------------------------------------------------------- Value Name Data Type Hexadecimal Value Decimal Value --------------------------------------------------------------------- ln(2 * max_float) S_FLOAT 42B2D4FC 89.41599 T_FLOAT 408633CE8FB9F87E 710.475860073943 --------------------------------------------------------------------- delim off sinh(3)
Man Page