Chapter Contents |
Previous |
Next |
tanh |
Portability: | ISO/ANSI C conforming, UNIX compatible |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
DIAGNOSTICS | |
EXAMPLE | |
RELATED FUNCTIONS | |
SEE ALSO |
SYNOPSIS |
#include <math.h> double tanh(double x);
DESCRIPTION |
tanh
computes the hyperbolic tangent of its argument x, as expressed by this relation:
RETURN VALUE |
tanh
returns the principal value of the hyperbolic tangent of the argument
x
, provided that this value is defined and computable.
The return value is a double-precision, floating-point number in the closed
interval [-1.0,1.0] .
DIAGNOSTICS |
If an error occurs in
tanh
, the
_matherr
routine is called.
You can supply your own version of
_matherr
to suppress the diagnostic message or modify the value returned.
EXAMPLE |
#include <math.h> #include <stdio.h> #define INVAL 3.8 main() { double hyper_tan; hyper_tan = tanh(INVAL); printf("tanh(%f) = %f\n", INVAL, hyper_tan); }
RELATED FUNCTIONS |
SEE ALSO |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.