Chapter Contents |
Previous |
Next |
cosh |
Portability: | ISO/ANSI C conforming, UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
DIAGNOSTICS | |
EXAMPLE | |
RELATED FUNCTIONS | |
SEE ALSO |
SYNOPSIS |
#include <math.h> double cosh(double x);
DESCRIPTION |
cosh
computes the hyperbolic cosine of its argument
x
, as expressed by the following relation:
RETURN VALUE |
cosh
returns the value of the hyperbolic cosine of the argument
x
, provided that this value is defined and computable. The return
value is a double-precision, floating-point number.
DIAGNOSTICS |
For
x
with an absolute value too large to be represented, the function returns
HUGE_VAL
. The run-time library writes an error
message to
stderr
(the standard error file).
If an error occurs in
cosh
, the
_matherr
routine is called.
You can supply your own version of
_matherr
to suppress the diagnostic message or modify the value returned.
EXAMPLE |
This example computes the hyperbolic secant
of a number using
cosh
:
#include <math.h> #include <stdio.h> #define VALUE 3.76182 main() { double secant_h; /* The hyperbolic secant of VALUE is 1 divided */ /* by the hyperbolic cosine of VALUE. */ secant_h = 1 / cosh(VALUE); printf("1 / cosh(%f) = %f\n", VALUE, secant_h); }
RELATED FUNCTIONS |
SEE ALSO |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.