Newton's Method for nth root, as an integer arithmetic for Computers
The actual values of my previous post are truly astronomical, and when I reviewed my python3 implementation, I found I re-invented the wheel differently on paper. Here is my python3 code, with comments: It is slightly more conservative with actual values. By experiment, it gives very good square roots for 3 - 8, at 4 iterations ############## main program ############################### # # This script attempts to calculate the nth root of k # ######################################################### k = int(input("Enter the number we are taking the root of: ")) n = int(input("Enter the power of the root: ")) i = int(input("How many iterations would you like to try? ")) a = k b = n ######################################################### # # The formula for the Convergence Method is: x_k+1 = x_k - {[x_k^n]- K # n[x_k]^n-1} # This is also represented as # # [n-1/n (x_k)]+ [K/n * (1/x_