public static double expm1(double value){
  if (USE_JDK_MATH) {
    return STRICT_MATH ? StrictMath.expm1(value) : Math.expm1(value);
  }
  if (Math.abs(value) < EXP_LO_DISTANCE_TO_ZERO) {
    int i=(int)(value * EXP_LO_INDEXING);
    double delta=value - i * (1.0 / EXP_LO_INDEXING);
    return expLoPosTab[i + EXP_LO_TAB_MID_INDEX] * (expLoNegTab[i + EXP_LO_TAB_MID_INDEX] + delta * (1 + delta * (1.0 / 2 + delta * (1.0 / 6 + delta * (1.0 / 24 + delta * (1.0 / 120))))));
  }
 else {
    return FastMath.exp(value) - 1;
  }
}

public static double expm1 ( double value ) { if ( USE_JDK_MATH ) { return STRICT_MATH ? StrictMath . expm1 ( value ) : Math . expm1 ( value ) ; } if ( Math . abs ( value ) < EXP_LO_DISTANCE_TO_ZERO ) { int i = ( int ) ( value * EXP_LO_INDEXING ) ; double delta = value - i * ( 1.0 / EXP_LO_INDEXING ) ; return expLoPosTab [ i + EXP_LO_TAB_MID_INDEX ] * ( expLoNegTab [ i + EXP_LO_TAB_MID_INDEX ] + delta * ( 1 + delta * ( 1.0 / 2 + delta * ( 1.0 / 6 + delta * ( 1.0 / 24 + delta * ( 1.0 / 120 ) ) ) ) ) ) ; } else { return FastMath . exp ( value ) - 1 ; } }
much more accurate than exp ( value ) - 1 , for values close to zero .
