Random point in a circle

[I heard this nice problem from Sumit Gulwani.]

You’re given a procedure that with a uniform probability distribution outputs random numbers between 0 and 1 (to some sufficiently high degree of precision, with which we need not concern ourselves in this puzzle). Using a bounded number of calls to this procedure, construct a procedure that with a uniform probability distribution outputs a random point within the unit circle.

©2019 K.R.M. Leino - Split Template by One Page Love