double tanh(double dX);
float tanh(float); double tanh(double); long double tanh(long double);
float tanhf(float); long double tanhl(long double);
* Note: Since C does not allow function overloading, these other versions of this function exist.
Domain (-∞, ∞) Range (-1.0, 1.0) Periodicity None Symmetry Origin Asymptotes None |
|
#include <iostream> #include <cmath> int main() { using namespace std; double dX = -0.05; cout << "x = " << dX << " tanh(x) = " << tanh(dX) << endl; dX = 1.8; cout << "x = " << dX << " tanh(x) = " << tanh(dX) << endl; return 0; }
© 20072024 XoaX.net LLC. All rights reserved.