Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentanh.c
Go to the documentation of this file.
00001 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ 00002 00003 #include <math.h> 00004 00005 #ifdef _MSC_VER 00006 #pragma function(tanh) 00007 #endif 00008 00009 /* 00010 * @implemented 00011 */ 00012 double tanh(double x) 00013 { 00014 if (x > 50) 00015 return 1; 00016 else if (x < -50) 00017 return -1; 00018 else 00019 { 00020 const double ebig = exp(x); 00021 const double esmall = 1.0/ebig; 00022 return (ebig - esmall) / (ebig + esmall); 00023 } 00024 } Generated on Sun May 27 2012 04:36:29 for ReactOS by
1.7.6.1
|