code: private static double checkedCumulativeProbability(double mean, long argument) {
          double result = cumulativeProbability(mean, argument);
          if (Double.isNaN(result)) {
              throw new AssertionError("Discrete cumulative probability function returned NaN " +
                      "for argument " + argument);
          }
          return result;
      }
docs: Computes the cumulative probability function and checks for {@code NaN}
  values returned. Throws {@code MathInternalError} if the value is
  {@code NaN}. Rethrows any exception encountered evaluating the cumulative
  probability function. Throws {@code MathInternalError} if the cumulative
  probability function returns {@code NaN}.
  
  @param argument input value
  @return the cumulative probability
  @throws AssertionError if the cumulative probability is {@code NaN}