Added a loop that invokes the sqrt function from the newmath library