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

NAME

6       cosh, coshf, coshl - hyperbolic cosine functions
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

DESCRIPTION

17       These  functions  shall compute the hyperbolic cosine of their argument
18       x.
19
20       An application wishing to check for error situations should  set  errno
21       to  zero  and  call  feclearexcept(FE_ALL_EXCEPT)  before calling these
22       functions.  On return, if errno is non-zero or  fetestexcept(FE_INVALID
23       |  FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is non-zero, an error has
24       occurred.
25

RETURN VALUE

27       Upon successful completion, these functions shall return the hyperbolic
28       cosine of x.
29
30       If  the  correct  value would cause overflow, a range error shall occur
31       and cosh(), coshf(), and coshl() shall return the value  of  the  macro
32       HUGE_VAL, HUGE_VALF, and HUGE_VALL, respectively.
33
34       If x is NaN, a NaN shall be returned.
35
36       If x is ±0, the value 1.0 shall be returned.
37
38       If x is ±Inf, +Inf shall be returned.
39

ERRORS

41       These functions shall fail if:
42
43       Range Error
44              The result would cause an overflow.
45
46       If  the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
47       then errno  shall  be  set  to  [ERANGE].  If  the  integer  expression
48       (math_errhandling  &  MATH_ERREXCEPT)  is  non-zero,  then the overflow
49       floating-point exception shall be raised.
50
51
52       The following sections are informative.
53

EXAMPLES

55       None.
56

APPLICATION USAGE

58       On  error,  the  expressions  (math_errhandling   &   MATH_ERRNO)   and
59       (math_errhandling  & MATH_ERREXCEPT) are independent of each other, but
60       at least one of them must be non-zero.
61
62       For IEEE Std 754-1985 double, 710.5 < |x| implies  that  cosh(  x)  has
63       overflowed.
64

RATIONALE

66       None.
67

FUTURE DIRECTIONS

69       None.
70

SEE ALSO

72       acosh()  , feclearexcept() , fetestexcept() , isnan() , sinh() , tanh()
73       , the Base Definitions volume of  IEEE Std 1003.1-2001,  Section  4.18,
74       Treatment of Error Conditions for Mathematical Functions, <math.h>
75
77       Portions  of  this text are reprinted and reproduced in electronic form
78       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
79       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
80       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
81       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
82       event of any discrepancy between this version and the original IEEE and
83       The  Open Group Standard, the original IEEE and The Open Group Standard
84       is the referee document. The original Standard can be  obtained  online
85       at http://www.opengroup.org/unix/online.html .
86
87
88
89IEEE/The Open Group                  2003                              COSH(P)
Impressum