1COSH(3)                    Linux Programmer's Manual                   COSH(3)
2
3
4

NAME

6       cosh, coshf, coshl - hyperbolic cosine function
7

SYNOPSIS

9       #include <math.h>
10
11       double cosh(double x);
12       float coshf(float x);
13       long double coshl(long double x);
14
15       Link with -lm.
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       coshf(), coshl():
20           _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
21               || /* Since glibc 2.19: */ _DEFAULT_SOURCE
22               || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
23

DESCRIPTION

25       These  functions  return  the  hyperbolic cosine of x, which is defined
26       mathematically as:
27
28           cosh(x) = (exp(x) + exp(-x)) / 2
29

RETURN VALUE

31       On success, these functions return the hyperbolic cosine of x.
32
33       If x is a NaN, a NaN is returned.
34
35       If x is +0 or -0, 1 is returned.
36
37       If x is positive infinity or negative infinity,  positive  infinity  is
38       returned.
39
40       If the result overflows, a range error occurs, and the functions return
41       +HUGE_VAL, +HUGE_VALF, or +HUGE_VALL, respectively.
42

ERRORS

44       See math_error(7) for information on how to determine whether an  error
45       has occurred when calling these functions.
46
47       The following errors can occur:
48
49       Range error: result overflow
50              errno  is  set  to ERANGE.  An overflow floating-point exception
51              (FE_OVERFLOW) is raised.
52

ATTRIBUTES

54       For  an  explanation  of  the  terms  used   in   this   section,   see
55       attributes(7).
56
57       ┌─────────────────────────┬───────────────┬─────────┐
58Interface                Attribute     Value   
59       ├─────────────────────────┼───────────────┼─────────┤
60cosh(), coshf(), coshl() │ Thread safety │ MT-Safe │
61       └─────────────────────────┴───────────────┴─────────┘

CONFORMING TO

63       C99, POSIX.1-2001, POSIX.1-2008.
64
65       The variant returning double also conforms to SVr4, 4.3BSD.
66

BUGS

68       In   glibc  version  2.3.4  and  earlier,  an  overflow  floating-point
69       (FE_OVERFLOW) exception is not raised when an overflow occurs.
70

SEE ALSO

72       acosh(3), asinh(3), atanh(3), ccos(3), sinh(3), tanh(3)
73

COLOPHON

75       This page is part of release 5.07 of the Linux  man-pages  project.   A
76       description  of  the project, information about reporting bugs, and the
77       latest    version    of    this    page,    can     be     found     at
78       https://www.kernel.org/doc/man-pages/.
79
80
81
82                                  2017-09-15                           COSH(3)
Impressum