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

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

Returns the arc hyperbolic cosine of x. The result is in radians.

Definition at line 1244 of file hmath.cpp.

References HNumber::isNan(), ln(), HNumber::nan(), and sqrt().

{
  HNumber one(1), zero(0);

  if(x.isNan() || x < one)
    return HNumber::nan();

  // We always return the positive arc hyperbolic cosine.
  return HMath::ln(x + HMath::sqrt(x * x - one));
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index