StdRandom { public static double exp(double lambda) { return -Math.log(1 - Math.random()) / lambda; } private  StdRandom(); static void setSeed(long seed); static double uniform(); static double random(); static int uniform(int N); static int uniform(int a, int b); static double uniform(double a, double b); static boolean bernoulli(double p); static boolean bernoulli(); static double gaussian(); static double gaussian(double mean, double stddev); static int geometric(double p); static int poisson(double lambda); static double pareto(double alpha); static double cauchy(); static int discrete(double[] a); static double exp(double lambda); static void shuffle(Object[] a); static void shuffle(double[] a); static void shuffle(int[] a); static void shuffle(Object[] a, int lo, int hi); static void shuffle(double[] a, int lo, int hi); static void shuffle(int[] a, int lo, int hi);  }
@Test public void testExp_1() throws Exception { double lambda = 1.0; double result = StdRandom.exp(lambda); }