Find the square root of the number without using any built-in function?
It is unlikely that mid * mid would ever be equal to x, so the opportunistic mid * mid != x consumes more cycles than it may save. I recommend to drop it entirely.
The convergence rate is not the best. Your algorithm adds (approximately) one bit of precision per iteration. Compare it to a classic Newton-Raphson, which doubles the amount of correct bits per iteration.
As mentioned in the comment, without using any built-in function part of assignment rules out using Math.abs.
You may want to check the input for correctness: both x and precision must be positive.