public static double quantile(double val,double k,double lambda,double theta){
  if (val < 0.0 || val > 1.0) {
    return Double.NaN;
  }
 else   if (val == 0) {
    return 0.0;
  }
 else   if (val == 1) {
    return Double.POSITIVE_INFINITY;
  }
 else {
    return theta + lambda * Math.pow(-Math.log(1.0 - val),1.0 / k);
  }
}

public static double quantile ( double val , double k , double lambda , double theta ) { if ( val < 0.0 || val > 1.0 ) { return Double . NaN ; } else if ( val == 0 ) { return 0.0 ; } else if ( val == 1 ) { return Double . POSITIVE_INFINITY ; } else { return theta + lambda * Math . pow ( - Math . log ( 1.0 - val ) , 1.0 / k ) ; } }
quantile function of weibull distribution
