public static double cdf(double x,double mu,double shape){
  if (!(x > 0.)) {
    return 0.;
  }
  final double v0=x / mu;
  final double v1=Math.sqrt(shape / x);
  if (v1 == 0.) {
    return v0 > 0. ? 1 : 0.;
  }
  double c1=NormalDistribution.standardNormalCDF(v1 * (v0 - 1.));
  double c2=NormalDistribution.standardNormalCDF(-v1 * (v0 + 1.));
  return (c2 > 0.) ? c1 + Math.exp(2 * shape / mu) * c2 : c1;
}

public static double cdf ( double x , double mu , double shape ) { if ( ! ( x > 0. ) ) { return 0. ; } final double v0 = x / mu ; final double v1 = Math . sqrt ( shape / x ) ; if ( v1 == 0. ) { return v0 > 0. ? 1 : 0. ; } double c1 = NormalDistribution . standardNormalCDF ( v1 * ( v0 - 1. ) ) ; double c2 = NormalDistribution . standardNormalCDF ( - v1 * ( v0 + 1. ) ) ; return ( c2 > 0. ) ? c1 + Math . exp ( 2 * shape / mu ) * c2 : c1 ; }
cumulative probability density function ( cdf ) of a wald distribution .
