Given a coin, compute Random(a,b) that is x, a <= x <= b, each number between a and b having the same probability to be chosen. What's the expected time for your function ?

Does anyone know a better solution than (b-a)/2 ?