v-man i would recommend you to ditch bisection and use the tangent method to calculate square roots (and generally zeroes of derivable functions)
here's an implementation
it's MUCH faster (MUCH!)
this calcolates sqrt up to the maximun precision allowed
also this is not recursive so it's another advantage my implementation has.
here's an implementation
[SELECT ALL] Code:
scroll down for the fixed version :) sry for the inconvenient
this calcolates sqrt up to the maximun precision allowed
also this is not recursive so it's another advantage my implementation has.