Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newton had a fun way to approximate general roots...
#2
Cool, I think I figured it out. Just applied a couple of tweaks to the above, and...

Code: (Select All)
DIM AS DOUBLE a, n, root
DO
    a = 1
    INPUT "Number: "; n
    INPUT "Root:   "; root
    DO
        olda = a
        a = a - ((a) ^ root - n) / (root * a ^ (root - 1))
        PRINT a
    LOOP UNTIL olda = a
LOOP

Pete
Shoot first and shoot people who ask questions, later.
Reply


Messages In This Thread
RE: Newton had a fun way to approximate square roots... - by Pete - 09-13-2022, 03:40 AM



Users browsing this thread: 13 Guest(s)