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

NAME

12       cosh, coshf, coshl - hyperbolic cosine functions
13

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

EXAMPLES

61       None.
62

APPLICATION USAGE

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

RATIONALE

72       None.
73

FUTURE DIRECTIONS

75       None.
76

SEE ALSO

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