示例#1
0
 public double cosh(double x) {
   double ex, mex;
   ex = Math.exp(x);
   mex = 1 / ex;
   return (ex + mex) / 2;
 }
示例#2
0
 public double tanh(double x) {
   double ex, mex;
   ex = Math.exp(x);
   mex = 1 / ex;
   return (ex - mex) / (ex + mex);
 }