OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man3 / tanh.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2002-07-27 by Walter Harms
31 .\"     (walter.harms@informatik.uni-oldenburg.de)
32 .\"
33 .TH TANH 3 2008-08-05 ""  "Linux Programmer's Manual"
34 .SH NAME
35 tanh, tanhf, tanhl \- hyperbolic tangent function
36 .SH SYNOPSIS
37 .nf
38 .B #include <math.h>
39 .sp
40 .BI "double tanh(double " x );
41 .br
42 .BI "float tanhf(float " x );
43 .br
44 .BI "long double tanhl(long double " x );
45 .fi
46 .sp
47 Link with \fI\-lm\fP.
48 .sp
49 .in -4n
50 Feature Test Macro Requirements for glibc (see
51 .BR feature_test_macros (7)):
52 .in
53 .sp
54 .ad l
55 .BR tanhf (),
56 .BR tanhl ():
57 _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
58 .I cc\ -std=c99
59 .ad b
60 .SH DESCRIPTION
61 The
62 .BR tanh ()
63 function returns the hyperbolic tangent of \fIx\fP, which
64 is defined mathematically as:
65 .nf
66
67     tanh(x) = sinh(x) / cosh(x)
68 .fi
69 .SH "RETURN VALUE"
70 On success, these functions return the hyperbolic tangent of
71 .IR x .
72
73 If
74 .I x
75 is a NaN, a NaN is returned.
76
77 If
78 .I x
79 is +0 (\-0), +0 (\-0) is returned.
80
81 If
82 .I x
83 is positive infinity (negative infinity),
84 +1 (\-1) is returned.
85 .\"
86 .\" POSIX.1-2001 documents an optional range error (underflow)
87 .\" for subnormal x;
88 .\" glibc 2.8 does not do this.
89 .SH ERRORS
90 No errors occur.
91 .SH "CONFORMING TO"
92 C99, POSIX.1-2001.
93 The variant returning
94 .I double
95 also conforms to
96 SVr4, 4.3BSD, C89.
97 .SH "SEE ALSO"
98 .BR acosh (3),
99 .BR asinh (3),
100 .BR atanh (3),
101 .BR cosh (3),
102 .BR ctanh (3),
103 .BR sinh (3)