public static double cdf(double val,double mu,double sigma,double xi){
  val=(val - mu) / sigma;
  if (val < 0) {
    return 0.;
  }
  if (xi < 0 && val > -1. / xi) {
    return 1.;
  }
  return 1 - Math.pow(1 + xi * val,-1. / xi);
}

public static double cdf ( double val , double mu , double sigma , double xi ) { val = ( val - mu ) / sigma ; if ( val < 0 ) { return 0. ; } if ( xi < 0 && val > - 1. / xi ) { return 1. ; } return 1 - Math . pow ( 1 + xi * val , - 1. / xi ) ; }
cdf of gpd distribution
