]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/cosh.3
update timestamp
[thirdparty/man-pages.git] / man3 / cosh.3
CommitLineData
fea681da 1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
5bb52d98
MK
2.\" and Copyright 2008, Linux Foundation, written by Michael Kerrisk
3.\" <mtk.manpages@gmail.com>
fea681da
MK
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.
c13182ef 13.\"
fea681da
MK
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.
c13182ef 21.\"
fea681da
MK
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 1996-06-08 by aeb
31.\" Modified 2002-07-27 by Walter Harms
32.\" (walter.harms@informatik.uni-oldenburg.de)
33.\"
a1949252 34.TH COSH 3 2008-08-05 "" "Linux Programmer's Manual"
fea681da
MK
35.SH NAME
36cosh, coshf, coshl \- hyperbolic cosine function
37.SH SYNOPSIS
38.nf
39.B #include <math.h>
40.sp
41.BI "double cosh(double " x );
42.br
43.BI "float coshf(float " x );
44.br
45.BI "long double coshl(long double " x );
46.fi
47.sp
20c58d70 48Link with \fI\-lm\fP.
5bb52d98
MK
49.sp
50.in -4n
51Feature Test Macro Requirements for glibc (see
52.BR feature_test_macros (7)):
53.in
54.sp
55.ad l
56.BR coshf (),
57.BR coshl ():
58_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 600 || _ISOC99_SOURCE; or
59.I cc\ -std=c99
60.ad b
fea681da 61.SH DESCRIPTION
60a90ecd
MK
62The
63.BR cosh ()
64function returns the hyperbolic cosine of \fIx\fP, which
658670de
MK
65is defined mathematically as:
66.nf
67
68 cosh(x) = (exp(x) + exp(\-x)) / 2
494fc522 69.fi
5bb52d98
MK
70.SH "RETURN VALUE"
71On success, these functions return the hyperbolic cosine of
72.IR x .
73
74If
75.I x
76is a NaN, a NaN is returned.
77
78If
79.I x
80is +0 or \-0, 1 is returned.
81
82If
83.I x
84is positive infinity or negative infinity,
85positive infinity is returned.
86
87If the result overflows,
88a "range error" occurs,
89and the functions return
90.RB + HUGE_VAL ,
91.RB + HUGE_VALF ,
92or
93.RB + HUGE_VALL ,
94respectively.
95.SH ERRORS
96See
97.BR math_error (7)
98for information on how to determine whether an error has occurred
99when calling these functions.
100.PP
101The following errors can occur:
102.TP
103Range error: result overflow
104.I errno
105is set to
106.BR ERANGE .
107An overflow floating-point exception
108.RB ( FE_OVERFLOW )
109is raised.
fea681da 110.SH "CONFORMING TO"
5bb52d98
MK
111C99, POSIX.1-2001.
112The variant returning
113.I double
114also conforms to
115SVr4, 4.3BSD.
fea681da
MK
116.SH "SEE ALSO"
117.BR acosh (3),
118.BR asinh (3),
119.BR atanh (3),
1e321034 120.BR ccos (3),
fea681da
MK
121.BR sinh (3),
122.BR tanh (3)