Adding a c++ version of the square root estimator