/*
   ###########################################################################
   This function computes the hyperbolic cosine function for  x >= 1

   ERRORS:
   Returns FALSE if argument is non-numeric.

   DEPENDENCY: BC_Ln()
   ###########################################################################
*/

   function BC_Cosh ($xArg, $Decimals=32)
{
   $x = trim($xArg); if (!Is_Numeric($x)) {return FALSE;}
   $Q = 50;
   $S = '';
   $q = trim($Decimals);   if($q < 1){$q = 1;}   if($q > 100){$q = 100;}

   $cosh = BC_Ln(bcAdd($x,bcSqRt(bcSub(bcMul($x,$x,$Q),'1',$Q),$Q),$Q),$Q);

   return $S.bcAdd($cosh, '0.'.Str_Repeat('0',$q).'5',$q);
}