public static double inverseError(double x){
  double z=Math.sqrt(Math.PI) * x;
  double res=(z) / 2;
  double z2=z * z;
  double zProd=z * z2;
  res+=(1.0 / 24) * zProd;
  zProd*=z2;
  res+=(7.0 / 960) * zProd;
  zProd*=z2;
  res+=(127 * zProd) / 80640;
  zProd*=z2;
  res+=(4369 * zProd) / 11612160;
  zProd*=z2;
  res+=(34807 * zProd) / 364953600;
  zProd*=z2;
  res+=(20036983 * zProd) / 797058662400d;
  return res;
}

public static double inverseError ( double x ) { double z = Math . sqrt ( Math . PI ) * x ; double res = ( z ) / 2 ; double z2 = z * z ; double zProd = z * z2 ; res += ( 1.0 / 24 ) * zProd ; zProd *= z2 ; res += ( 7.0 / 960 ) * zProd ; zProd *= z2 ; res += ( 127 * zProd ) / 80640 ; zProd *= z2 ; res += ( 4369 * zProd ) / 11612160 ; zProd *= z2 ; res += ( 34807 * zProd ) / 364953600 ; zProd *= z2 ; res += ( 20036983 * zProd ) / 797058662400d ; return res ; }
approximates the inverse error function . clustream needs this .
