原型:extern float tanh(float x); 用法:#include <math.h> 功能:求x的双曲正切值 说明:tanh(x)=(e^x-e^(-x))/(e^2+e^(-x)) 举例:
// tanh.c #include <syslib.h> #include <math.h>
main() { float x; clrscr(); // clear screen textmode(0x00); // 6 lines per LCD screen x=PI/4.; printf("tanh(%.4f)=%.4f\n",x,tanh(x)); getchar(); return 0; }