x = 2.0; lnX = 1.0; y = unifReal(0.,1.); while( y < 0.5) do y = unifReal(0.,1.); x = x * 2.0; lnX = lnX + 1.0 end; estimateProb( x <= 1000.0)