home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / libsrc / m / src / tanh.c < prev   
Encoding:
C/C++ Source or Header  |  1993-05-31  |  163 b   |  10 lines

  1. #include <math.h>
  2.  
  3. double tanh(double x)
  4. {
  5.   const double ebig = exp(x);
  6.   const double esmall = 1.0/ebig;
  7.   return (ebig - esmall) / (ebig + esmall);
  8. }
  9.  
  10.