1COSH(3P)                   POSIX Programmer's Manual                  COSH(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       cosh, coshf, coshl — hyperbolic cosine functions
14

SYNOPSIS

16       #include <math.h>
17
18       double cosh(double x);
19       float coshf(float x);
20       long double coshl(long double x);
21

DESCRIPTION

23       The functionality described on this reference page is aligned with  the
24       ISO C  standard.  Any  conflict between the requirements described here
25       and the ISO C standard is unintentional. This  volume  of  POSIX.1‐2008
26       defers to the ISO C standard.
27
28       These  functions  shall compute the hyperbolic cosine of their argument
29       x.
30
31       An application wishing to check for error situations should  set  errno
32       to  zero  and  call  feclearexcept(FE_ALL_EXCEPT)  before calling these
33       functions. On return, if errno is non-zero or fetestexcept(FE_INVALID |
34       FE_DIVBYZERO  |  FE_OVERFLOW  | FE_UNDERFLOW) is non-zero, an error has
35       occurred.
36

RETURN VALUE

38       Upon successful completion, these functions shall return the hyperbolic
39       cosine of x.
40
41       If  the  correct  value would cause overflow, a range error shall occur
42       and cosh(), coshf(), and coshl() shall return the value  of  the  macro
43       HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively.
44
45       If x is NaN, a NaN shall be returned.
46
47       If x is ±0, the value 1.0 shall be returned.
48
49       If x is ±Inf, +Inf shall be returned.
50

ERRORS

52       These functions shall fail if:
53
54       Range Error The result would cause an overflow.
55
56                   If  the  integer expression (math_errhandling & MATH_ERRNO)
57                   is non-zero, then errno shall be set to [ERANGE].   If  the
58                   integer  expression  (math_errhandling & MATH_ERREXCEPT) is
59                   non-zero, then the overflow floating-point exception  shall
60                   be raised.
61
62       The following sections are informative.
63

EXAMPLES

65       None.
66

APPLICATION USAGE

68       On   error,   the   expressions  (math_errhandling  &  MATH_ERRNO)  and
69       (math_errhandling & MATH_ERREXCEPT) are independent of each other,  but
70       at least one of them must be non-zero.
71
72       For  IEEE Std 754‐1985  double,  710.5  <  |x| implies that cosh(x) has
73       overflowed.
74

RATIONALE

76       None.
77

FUTURE DIRECTIONS

79       None.
80

SEE ALSO

82       acosh(), feclearexcept(), fetestexcept(), isnan(), sinh(), tanh()
83
84       The Base Definitions volume of POSIX.1‐2008, Section 4.19, Treatment of
85       Error Conditions for Mathematical Functions, <math.h>
86
88       Portions  of  this text are reprinted and reproduced in electronic form
89       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
90       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
91       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
92       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
93       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
94       event of any discrepancy between this version and the original IEEE and
95       The Open Group Standard, the original IEEE and The Open Group  Standard
96       is  the  referee document. The original Standard can be obtained online
97       at http://www.unix.org/online.html .
98
99       Any typographical or formatting errors that appear  in  this  page  are
100       most likely to have been introduced during the conversion of the source
101       files to man page format. To report such errors,  see  https://www.ker
102       nel.org/doc/man-pages/reporting_bugs.html .
103
104
105
106IEEE/The Open Group                  2013                             COSH(3P)
Impressum