Program: 57168
Project: 57168
Buggy source:
/** 
 * Internal helper method for exponential function.
 * @param x original argument of the exponential function
 * @param extra extra bits of precision on input (To Be Confirmed)
 * @param hiPrec extra bits of precision on output (To Be Confirmed)
 * @return exp(x)
 */
private static double exp(double x,double extra,double[] hiPrec){
  double intPartA;
  double intPartB;
  int intVal;
  System.out.println("String_Node_Str" + x + "String_Node_Str");
  if (x < 0.0) {
    intVal=(int)-x;
    System.out.println("String_Node_Str" + intVal);
    if (intVal > 746) {
      if (hiPrec != null) {
        hiPrec[0]=0.0;
        hiPrec[1]=0.0;
      }
      return 0.0;
    }
    if (intVal > 709) {
      final double result=exp(x + 40.19140625,extra,hiPrec) / 285040095144011776.0;
      if (hiPrec != null) {
        hiPrec[0]/=285040095144011776.0;
        hiPrec[1]/=285040095144011776.0;
      }
      return result;
    }
    if (intVal == 709) {
      final double result=exp(x + 1.494140625,extra,hiPrec) / 4.455505956692756620;
      if (hiPrec != null) {
        hiPrec[0]/=4.455505956692756620;
        hiPrec[1]/=4.455505956692756620;
      }
      return result;
    }
    intVal++;
    intPartA=ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX - intVal];
    intPartB=ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX - intVal];
    intVal=-intVal;
  }
 else {
    intVal=(int)x;
    if (intVal > 709) {
      if (hiPrec != null) {
        hiPrec[0]=Double.POSITIVE_INFINITY;
        hiPrec[1]=0.0;
      }
      return Double.POSITIVE_INFINITY;
    }
    intPartA=ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX + intVal];
    intPartB=ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX + intVal];
  }
  final int intFrac=(int)((x - intVal) * 1024.0);
  final double fracPartA=ExpFracTable.EXP_FRAC_TABLE_A[intFrac];
  final double fracPartB=ExpFracTable.EXP_FRAC_TABLE_B[intFrac];
  final double epsilon=x - (intVal + intFrac / 1024.0);
  double z=0.04168701738764507;
  z=z * epsilon + 0.1666666505023083;
  z=z * epsilon + 0.5000000000042687;
  z=z * epsilon + 1.0;
  z=z * epsilon + -3.940510424527919E-20;
  double tempA=intPartA * fracPartA;
  double tempB=intPartA * fracPartB + intPartB * fracPartA + intPartB * fracPartB;
  final double tempC=tempB + tempA;
  final double result;
  if (extra != 0.0) {
    result=tempC * extra * z + tempC * extra + tempC * z + tempB + tempA;
  }
 else {
    result=tempC * z + tempB + tempA;
  }
  if (hiPrec != null) {
    hiPrec[0]=tempA;
    hiPrec[1]=tempC * extra * z + tempC * extra + tempC * z + tempB;
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Internal helper method for exponential function.
 * @param x original argument of the exponential function
 * @param extra extra bits of precision on input (To Be Confirmed)
 * @param hiPrec extra bits of precision on output (To Be Confirmed)
 * @return exp(x)
 */
private static double exp(double x,double extra,double[] hiPrec){
  double intPartA;
  double intPartB;
  int intVal;
  if (x < 0.0) {
    intVal=(int)-x;
    if (intVal > 746) {
      if (hiPrec != null) {
        hiPrec[0]=0.0;
        hiPrec[1]=0.0;
      }
      return 0.0;
    }
    if (intVal > 709) {
      final double result=exp(x + 40.19140625,extra,hiPrec) / 285040095144011776.0;
      if (hiPrec != null) {
        hiPrec[0]/=285040095144011776.0;
        hiPrec[1]/=285040095144011776.0;
      }
      return result;
    }
    if (intVal == 709) {
      final double result=exp(x + 1.494140625,extra,hiPrec) / 4.455505956692756620;
      if (hiPrec != null) {
        hiPrec[0]/=4.455505956692756620;
        hiPrec[1]/=4.455505956692756620;
      }
      return result;
    }
    intVal++;
    intPartA=ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX - intVal];
    intPartB=ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX - intVal];
    intVal=-intVal;
  }
 else {
    intVal=(int)x;
    if (intVal > 709) {
      if (hiPrec != null) {
        hiPrec[0]=Double.POSITIVE_INFINITY;
        hiPrec[1]=0.0;
      }
      return Double.POSITIVE_INFINITY;
    }
    intPartA=ExpIntTable.EXP_INT_TABLE_A[EXP_INT_TABLE_MAX_INDEX + intVal];
    intPartB=ExpIntTable.EXP_INT_TABLE_B[EXP_INT_TABLE_MAX_INDEX + intVal];
  }
  final int intFrac=(int)((x - intVal) * 1024.0);
  final double fracPartA=ExpFracTable.EXP_FRAC_TABLE_A[intFrac];
  final double fracPartB=ExpFracTable.EXP_FRAC_TABLE_B[intFrac];
  final double epsilon=x - (intVal + intFrac / 1024.0);
  double z=0.04168701738764507;
  z=z * epsilon + 0.1666666505023083;
  z=z * epsilon + 0.5000000000042687;
  z=z * epsilon + 1.0;
  z=z * epsilon + -3.940510424527919E-20;
  double tempA=intPartA * fracPartA;
  double tempB=intPartA * fracPartB + intPartB * fracPartA + intPartB * fracPartB;
  final double tempC=tempB + tempA;
  final double result;
  if (extra != 0.0) {
    result=tempC * extra * z + tempC * extra + tempC * z + tempB + tempA;
  }
 else {
    result=tempC * z + tempB + tempA;
  }
  if (hiPrec != null) {
    hiPrec[0]=tempA;
    hiPrec[1]=tempC * extra * z + tempC * extra + tempC * z + tempB;
  }
  return result;
}