C++, pasted on Jun 1:
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 ``` ```// Compare babylonian and newton raphson #include int iter = 0; double babylonian_sqrt(double arg) { double eps = 1E-16; double rt = arg / 4.0; double sq = rt * rt; while( (arg - sq > eps) || (sq - arg > eps) ) { rt += arg / rt; rt /= 2; sq = rt * rt; ++iter; } return rt; } double nr_sqrt(double arg) { double eps = 1E-16; double rt = arg / 4.0; double sq = rt * rt; while( (arg - sq > eps) || (sq - arg > eps) ) { double fx = sq - arg; double dx = 2 * rt; rt -= fx / dx; sq = rt * rt; ++iter; } return rt; } int main() { const double num = 63.; iter = 0; const double baby = babylonian_sqrt(num); printf( "Sqrt(%g) by Ancient Baylonian (After %03d iteration) = %.20g\n" , num , iter , baby); iter = 0; const double nr = nr_sqrt(num); printf( "Sqrt(%g) by Newton - Raphson (After %03d iteration) = %.20g\n" , num , iter , nr); return 0; } ```

Output:
 ```1 2 ``` ```Sqrt(63) by Ancient Baylonian (After 006 iteration) = 7.9372539331937721485 Sqrt(63) by Newton - Raphson (After 006 iteration) = 7.9372539331937721485 ```