public static void sinhAndCosh(double value,DoubleWrapper hsine,DoubleWrapper hcosine){
  if (USE_JDK_MATH) {
    hsine.value=STRICT_MATH ? StrictMath.sinh(value) : Math.sinh(value);
    hcosine.value=STRICT_MATH ? StrictMath.cosh(value) : Math.cosh(value);
    return;
  }
  double h;
  if (value < 0.0) {
    value=-value;
    h=-0.5;
  }
 else {
    h=0.5;
  }
  if (value < LOG_TWO_POW_27) {
    if (value < TWO_POW_N28) {
      hsine.value=(h < 0.0) ? -value : value;
    }
 else {
      double t=FastMath.expm1(value);
      hsine.value=h * (t + t / (t + 1.0));
    }
    if (value < TWO_POW_N27) {
      hcosine.value=1;
    }
 else {
      double t=FastMath.exp(value);
      hcosine.value=0.5 * (t + 1 / t);
    }
  }
 else   if (value < 22.0) {
    double t=FastMath.expm1(value);
    hsine.value=h * (t + t / (t + 1.0));
    hcosine.value=0.5 * (t + 1.0);
  }
 else {
    if (value < LOG_DOUBLE_MAX_VALUE) {
      hsine.value=h * FastMath.exp(value);
    }
 else {
      double t=FastMath.exp(value * 0.5);
      hsine.value=(h * t) * t;
    }
    hcosine.value=Math.abs(hsine.value);
  }
}

public static void sinhAndCosh ( double value , DoubleWrapper hsine , DoubleWrapper hcosine ) { if ( USE_JDK_MATH ) { hsine . value = STRICT_MATH ? StrictMath . sinh ( value ) : Math . sinh ( value ) ; hcosine . value = STRICT_MATH ? StrictMath . cosh ( value ) : Math . cosh ( value ) ; return ; } double h ; if ( value < 0.0 ) { value = - value ; h = - 0.5 ; } else { h = 0.5 ; } if ( value < LOG_TWO_POW_27 ) { if ( value < TWO_POW_N28 ) { hsine . value = ( h < 0.0 ) ? - value : value ; } else { double t = FastMath . expm1 ( value ) ; hsine . value = h * ( t + t / ( t + 1.0 ) ) ; } if ( value < TWO_POW_N27 ) { hcosine . value = 1 ; } else { double t = FastMath . exp ( value ) ; hcosine . value = 0.5 * ( t + 1 / t ) ; } } else if ( value < 22.0 ) { double t = FastMath . expm1 ( value ) ; hsine . value = h * ( t + t / ( t + 1.0 ) ) ; hcosine . value = 0.5 * ( t + 1.0 ) ; } else { if ( value < LOG_DOUBLE_MAX_VALUE ) { hsine . value = h * FastMath . exp ( value ) ; } else { double t = FastMath . exp ( value * 0.5 ) ; hsine . value = ( h * t ) * t ; } hcosine . value = Math . abs ( hsine . value ) ; } }
computes hyperbolic sine and hyperbolic cosine together , at the cost of . . . a dependency of this class with doublewrapper .
