home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / vbcc / machines / amigappc / libsrc / math / tanh.c < prev   
Encoding:
C/C++ Source or Header  |  1998-06-24  |  122 b   |  10 lines

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