

#include <math.h> double tanh(double x);
tanh computes the hyperbolic tangent of its argument x, as expressed by
this relation:
r = (e**x - e**-x) / (e**x + e**-x)
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].
tanh, the _matherr routine is called. You
can supply your own version of _matherr to suppress the diagnostic
message or modify the value returned.
#include <math.h>
#include <stdio.h>
#define INVAL 3.8
main()
{
double hyper_tan;
hyper_tan = tanh(INVAL);
printf("tanh(%f) = %fn", INVAL, hyper_tan);
}
cosh, _matherr, sinh
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.