Logo Search packages:      
Sourcecode: abakus version File versions  Download package

HNumber HMath::tanh ( const HNumber x ) [static]

Returns the hyperbolic tangent of x. Note that x must be in radians.

Definition at line 1255 of file hmath.cpp.

References cosh(), HNumber::isNan(), HNumber::isZero(), HNumber::nan(), and sinh().

  if( x.isNan() )
    return HNumber::nan();

  // tanh(h) = sinh(x)/cosh(x)    
  HNumber c = HMath::cosh( x );
  if( c.isZero() )
    return HNumber::nan();
  HNumber s = HMath::sinh( x );
  HNumber result = s / c;
  return result;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index