2 #include "MathFunctions.h"
4 // a hack square root calculation using simple operations
5 double mysqrt(double x)
18 for (i = 0; i < 10; ++i)
24 delta = x - (result*result);
25 result = result + 0.5*delta/result;
26 fprintf(stdout,"Computing sqrt of %g to be %g\n",x,result);