Solution (source code)

= Solution

For $x\geq0$, the monotonicity of the logarithm and the <uniform distribution> give
$$
P\left(-\frac{\log U}{\lambda}\leq x\right)=P(U\geq e^{-\lambda x})=1-e^{-\lambda x}.
$$
For $x<0$ the <cumulative distribution function> is zero. Differentiation gives the <probability density function> $f(x)=\lambda e^{-\lambda x}$ for $x>0$, and zero elsewhere. \b[The distribution is $\boxed{\operatorname{Exp}(\lambda)}$], with rate $\lambda$. This is <inverse transform sampling> of an <exponential distribution>.