public static double cdf(double val,double rate){
  if (val < 0.) {
    return 0.;
  }
  return 1 - Math.exp(-rate * val);
}

public static double cdf ( double val , double rate ) { if ( val < 0. ) { return 0. ; } return 1 - Math . exp ( - rate * val ) ; }
cumulative density , static version
