An API call succeeds with probability p per attempt, and you will make at
most r attempts. Return the probability it succeeds at some point.
A call that fails 20% of the time is down to 0.8% failure after three tries, which is why retries are worth so much more than they look.
Input
p = 0.8
r = 3
Output
0.992