question: public static double exp ( double lambda ) { if ( ! ( lambda > 0.0 ) ) throw new IllegalArgumentException ( "Rate lambda must be positive" ) ; return - Math . log ( 1 - uniform ( ) ) / lambda ; }
target:  Returns a random real number from an exponential distribution with rate &lambda;.