public static double quantile(double val,double rate,double location){
  if (val < .5) {
    return Math.log(2 * val) / rate + location;
  }
 else {
    return -Math.log(2. - 2. * val) / rate + location;
  }
}

public static double quantile ( double val , double rate , double location ) { if ( val < .5 ) { return Math . log ( 2 * val ) / rate + location ; } else { return - Math . log ( 2. - 2. * val ) / rate + location ; } }
quantile function , static version
