cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: [RT] Adaptive Caching
Date Wed, 16 Jul 2003 20:46:52 GMT
Berin Loritsch wrote:
> Speaking of accademic, anyone have a Java implementation of tanh(x)?  The
> java.lang.Math class only has tan(x) or atan(x), but no hyperbolic 
> function.

Trivial, see
  http://functions.wolfram.com/ElementaryFunctions/Tanh/02/
(yeah, wolfram research is for mathematics on the net what
wikipedia is for the rest)

  double tanh(double x) {
   return (Math.exp(x)-Math.exp(-x))/(Math.exp(x)+Math.exp(-x));
  }

Have fun!

J.Pietschmann



Mime
View raw message