Cody

# Problem 44344. The 5th Root

Solution 2677352

Submitted on 10 Jul 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
filetext = fileread('fifth_root.m'); assert(isempty(strfind(filetext, '^')),'^ forbidden') assert(isempty(strfind(filetext, 'power')),'power() forbidden') assert(isempty(strfind(filetext, 'mpower')),'mpower() forbidden') assert(isempty(strfind(filetext, 'realpow')),'realpow() forbidden') assert(isempty(strfind(filetext, 'nthroot')),'nthroot() forbidden') assert(isempty(strfind(filetext, 'roots')),'roots() forbidden')

^ forbidden

2   Pass
n = 1/9765625; assert(abs(fifth_root(n)-1/25)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = 1.0000 x_last = 1 xn = 0.8000 i = 1 ans = -0.2000 x_last = 0.8000 xn = 0.6400 i = 2 ans = -0.1600 x_last = 0.6400 xn = 0.5120 i = 3 ans = -0.1280 x_last = 0.5120 xn = 0.4096 i = 4 ans = -0.1024 x_last = 0.4096 xn = 0.3277 i = 5 ans = -0.0819 x_last = 0.3277 xn = 0.2621 i = 6 ans = -0.0655 x_last = 0.2621 xn = 0.2097 i = 7 ans = -0.0524 x_last = 0.2097 xn = 0.1678 i = 8 ans = -0.0419 x_last = 0.1678 xn = 0.1343 i = 9 ans = -0.0335 x_last = 0.1343 xn = 0.1075 i = 10 ans = -0.0268 x_last = 0.1075 xn = 0.0861 i = 11 ans = -0.0213 x_last = 0.0861 xn = 0.0693 i = 12 ans = -0.0169 x_last = 0.0693 xn = 0.0563 i = 13 ans = -0.0130 x_last = 0.0563 xn = 0.0471 i = 14 ans = -0.0092 x_last = 0.0471 xn = 0.0418 i = 15 ans = -0.0052 x_last = 0.0418 xn = 0.0402 i = 16 ans = -0.0017 x_last = 0.0402 xn = 0.0400 i = 17 ans = -1.5280e-04 x_last = 0.0400 xn = 0.0400 i = 18

3   Pass
n = 1/5555; assert(abs(fifth_root(n)-0.178263811215444)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = 0.9998 x_last = 1 xn = 0.8000 i = 1 ans = -0.2000 x_last = 0.8000 xn = 0.6401 i = 2 ans = -0.1599 x_last = 0.6401 xn = 0.5123 i = 3 ans = -0.1278 x_last = 0.5123 xn = 0.4104 i = 4 ans = -0.1019 x_last = 0.4104 xn = 0.3296 i = 5 ans = -0.0808 x_last = 0.3296 xn = 0.2667 i = 6 ans = -0.0629 x_last = 0.2667 xn = 0.2205 i = 7 ans = -0.0462 x_last = 0.2205 xn = 0.1916 i = 8 ans = -0.0289 x_last = 0.1916 xn = 0.1800 i = 9 ans = -0.0116 x_last = 0.1800 xn = 0.1783 i = 10 ans = -0.0017 x_last = 0.1783 xn = 0.1783 i = 11 ans = -3.3168e-05 x_last = 0.1783 xn = 0.1783 i = 12

4   Pass
n = 1/3125; assert(abs(fifth_root(n)-1/5)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = 0.9997 x_last = 1 xn = 0.8001 i = 1 ans = -0.1999 x_last = 0.8001 xn = 0.6402 i = 2 ans = -0.1599 x_last = 0.6402 xn = 0.5125 i = 3 ans = -0.1277 x_last = 0.5125 xn = 0.4110 i = 4 ans = -0.1016 x_last = 0.4110 xn = 0.3310 i = 5 ans = -0.0799 x_last = 0.3310 xn = 0.2701 i = 6 ans = -0.0609 x_last = 0.2701 xn = 0.2281 i = 7 ans = -0.0420 x_last = 0.2281 xn = 0.2061 i = 8 ans = -0.0220 x_last = 0.2061 xn = 0.2004 i = 9 ans = -0.0058 x_last = 0.2004 xn = 0.2000 i = 10 ans = -3.5310e-04 x_last = 0.2000 xn = 0.2000 i = 11

5   Pass
n = 1/125; assert(abs(fifth_root(n)-0.380730787743176)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = 0.9920 x_last = 1 xn = 0.8016 i = 1 ans = -0.1984 x_last = 0.8016 xn = 0.6452 i = 2 ans = -0.1564 x_last = 0.6452 xn = 0.5254 i = 3 ans = -0.1198 x_last = 0.5254 xn = 0.4413 i = 4 ans = -0.0841 x_last = 0.4413 xn = 0.3952 i = 5 ans = -0.0461 x_last = 0.3952 xn = 0.3818 i = 6 ans = -0.0135 x_last = 0.3818 xn = 0.3807 i = 7 ans = -0.0010 x_last = 0.3807 xn = 0.3807 i = 8

6   Pass
n = 1/5; assert(abs(fifth_root(n)-0.724779663677696)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = 0.8000 x_last = 1 xn = 0.8400 i = 1 ans = -0.1600 x_last = 0.8400 xn = 0.7523 i = 2 ans = -0.0877 x_last = 0.7523 xn = 0.7267 i = 3 ans = -0.0256 x_last = 0.7267 xn = 0.7248 i = 4 ans = -0.0019 x_last = 0.7248 xn = 0.7248 i = 5 ans = -1.0403e-05 x_last = 0.7248 xn = 0.7248 i = 6

7   Pass
n = 1; assert(abs(fifth_root(n)-1)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4))

8   Pass
n = 5; assert(abs(fifth_root(n)-1.37972966146121)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -4 x_last = 1 xn = 1.8000 i = 1 ans = 0.8000 x_last = 1.8000 xn = 1.5353 i = 2 ans = -0.2647 x_last = 1.5353 xn = 1.4082 i = 3 ans = -0.1271 x_last = 1.4082 xn = 1.3809 i = 4 ans = -0.0273 x_last = 1.3809 xn = 1.3797 i = 5 ans = -0.0011 x_last = 1.3797 xn = 1.3797 i = 6

9   Pass
n = 25; assert(abs(fifth_root(n)-1.90365393871588)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -24 x_last = 1 xn = 5.8000 i = 1 ans = 4.8000 x_last = 5.8000 xn = 4.6444 i = 2 ans = -1.1556 x_last = 4.6444 xn = 3.7263 i = 3 ans = -0.9181 x_last = 3.7263 xn = 3.0070 i = 4 ans = -0.7193 x_last = 3.0070 xn = 2.4667 i = 5 ans = -0.5402 x_last = 2.4667 xn = 2.1084 i = 6 ans = -0.3583 x_last = 2.1084 xn = 1.9398 i = 7 ans = -0.1687 x_last = 1.9398 xn = 1.9050 i = 8 ans = -0.0348 x_last = 1.9050 xn = 1.9037 i = 9 ans = -0.0013 x_last = 1.9037 xn = 1.9037 i = 10

10   Pass
n = 50; assert(abs(fifth_root(n)-2.18672414788656)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -49 x_last = 1 xn = 10.8000 i = 1 ans = 9.8000 x_last = 10.8000 xn = 8.6407 i = 2 ans = -2.1593 x_last = 8.6407 xn = 6.9144 i = 3 ans = -1.7264 x_last = 6.9144 xn = 5.5359 i = 4 ans = -1.3785 x_last = 5.5359 xn = 4.4394 i = 5 ans = -1.0965 x_last = 4.4394 xn = 3.5772 i = 6 ans = -0.8621 x_last = 3.5772 xn = 2.9229 i = 7 ans = -0.6544 x_last = 2.9229 xn = 2.4753 i = 8 ans = -0.4476 x_last = 2.4753 xn = 2.2466 i = 9 ans = -0.2287 x_last = 2.2466 xn = 2.1898 i = 10 ans = -0.0568 x_last = 2.1898 xn = 2.1867 i = 11 ans = -0.0031 x_last = 2.1867 xn = 2.1867 i = 12

11   Pass
n = 500; assert(abs(fifth_root(n)-3.46572421577573)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -499 x_last = 1 xn = 100.8000 i = 1 ans = 99.8000 x_last = 100.8000 xn = 80.6400 i = 2 ans = -20.1600 x_last = 80.6400 xn = 64.5120 i = 3 ans = -16.1280 x_last = 64.5120 xn = 51.6096 i = 4 ans = -12.9024 x_last = 51.6096 xn = 41.2877 i = 5 ans = -10.3219 x_last = 41.2877 xn = 33.0302 i = 6 ans = -8.2575 x_last = 33.0302 xn = 26.4242 i = 7 ans = -6.6060 x_last = 26.4242 xn = 21.1396 i = 8 ans = -5.2846 x_last = 21.1396 xn = 16.9122 i = 9 ans = -4.2274 x_last = 16.9122 xn = 13.5310 i = 10 ans = -3.3812 x_last = 13.5310 xn = 10.8278 i = 11 ans = -2.7032 x_last = 10.8278 xn = 8.6695 i = 12 ans = -2.1583 x_last = 8.6695 xn = 6.9533 i = 13 ans = -1.7162 x_last = 6.9533 xn = 5.6054 i = 14 ans = -1.3479 x_last = 5.6054 xn = 4.5856 i = 15 ans = -1.0198 x_last = 4.5856 xn = 3.8947 i = 16 ans = -0.6910 x_last = 3.8947 xn = 3.5504 i = 17 ans = -0.3443 x_last = 3.5504 xn = 3.4697 i = 18 ans = -0.0807 x_last = 3.4697 xn = 3.4657 i = 19 ans = -0.0039 x_last = 3.4657 xn = 3.4657 i = 20

12   Pass
n = 3125; assert(abs(fifth_root(n)-5)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -3124 x_last = 1 xn = 625.8000 i = 1 ans = 624.8000 x_last = 625.8000 xn = 500.6400 i = 2 ans = -125.1600 x_last = 500.6400 xn = 400.5120 i = 3 ans = -100.1280 x_last = 400.5120 xn = 320.4096 i = 4 ans = -80.1024 x_last = 320.4096 xn = 256.3277 i = 5 ans = -64.0819 x_last = 256.3277 xn = 205.0621 i = 6 ans = -51.2655 x_last = 205.0621 xn = 164.0497 i = 7 ans = -41.0124 x_last = 164.0497 xn = 131.2398 i = 8 ans = -32.8099 x_last = 131.2398 xn = 104.9918 i = 9 ans = -26.2480 x_last = 104.9918 xn = 83.9935 i = 10 ans = -20.9984 x_last = 83.9935 xn = 67.1948 i = 11 ans = -16.7987 x_last = 67.1948 xn = 53.7559 i = 12 ans = -13.4389 x_last = 53.7559 xn = 43.0048 i = 13 ans = -10.7511 x_last = 43.0048 xn = 34.4040 i = 14 ans = -8.6008 x_last = 34.4040 xn = 27.5236 i = 15 ans = -6.8804 x_last = 27.5236 xn = 22.0200 i = 16 ans = -5.5036 x_last = 22.0200 xn = 17.6187 i = 17 ans = -4.4013 x_last = 17.6187 xn = 14.1014 i = 18 ans = -3.5172 x_last = 14.1014 xn = 11.2969 i = 19 ans = -2.8045 x_last = 11.2969 xn = 9.0759 i = 20 ans = -2.2210 x_last = 9.0759 xn = 7.3529 i = 21 ans = -1.7231 x_last = 7.3529 xn = 6.0961 i = 22 ans = -1.2567 x_last = 6.0961 xn = 5.3294 i = 23 ans = -0.7667 x_last = 5.3294 xn = 5.0383 i = 24 ans = -0.2912 x_last = 5.0383 xn = 5.0006 i = 25 ans = -0.0377 x_last = 5.0006 xn = 5.0000 i = 26 ans = -5.7738e-04 x_last = 5.0000 xn = 5.0000 i = 27

13   Pass
n = 759375; assert(abs(fifth_root(n)-15)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -759374 x_last = 1 xn = 1.5188e+05 i = 1 ans = 1.5187e+05 x_last = 1.5188e+05 xn = 1.2150e+05 i = 2 ans = -3.0375e+04 x_last = 1.2150e+05 xn = 9.7201e+04 i = 3 ans = -2.4300e+04 x_last = 9.7201e+04 xn = 7.7760e+04 i = 4 ans = -1.9440e+04 x_last = 7.7760e+04 xn = 6.2208e+04 i = 5 ans = -1.5552e+04 x_last = 6.2208e+04 xn = 4.9767e+04 i = 6 ans = -1.2442e+04 x_last = 4.9767e+04 xn = 3.9813e+04 i = 7 ans = -9.9533e+03 x_last = 3.9813e+04 xn = 3.1851e+04 i = 8 ans = -7.9627e+03 x_last = 3.1851e+04 xn = 2.5481e+04 i = 9 ans = -6.3701e+03 x_last = 2.5481e+04 xn = 2.0384e+04 i = 10 ans = -5.0961e+03 x_last = 2.0384e+04 xn = 1.6308e+04 i = 11 ans = -4.0769e+03 x_last = 1.6308e+04 xn = 1.3046e+04 i = 12 ans = -3.2615e+03 x_last = 1.3046e+04 xn = 1.0437e+04 i = 13 ans = -2.6092e+03 x_last = 1.0437e+04 xn = 8.3495e+03 i = 14 ans = -2.0874e+03 x_last = 8.3495e+03 xn = 6.6796e+03 i = 15 ans = -1.6699e+03 x_last = 6.6796e+03 xn = 5.3437e+03 i = 16 ans = -1.3359e+03 x_last = 5.3437e+03 xn = 4.2749e+03 i = 17 ans = -1.0687e+03 x_last = 4.2749e+03 xn = 3.4199e+03 i = 18 ans = -854.9847 x_last = 3.4199e+03 xn = 2.7360e+03 i = 19 ans = -683.9878 x_last = 2.7360e+03 xn = 2.1888e+03 i = 20 ans = -547.1902 x_last = 2.1888e+03 xn = 1.7510e+03 i = 21 ans = -437.7522 x_last = 1.7510e+03 xn = 1.4008e+03 i = 22 ans = -350.2018 x_last = 1.4008e+03 xn = 1.1206e+03 i = 23 ans = -280.1614 x_last = 1.1206e+03 xn = 896.5165 i = 24 ans = -224.1291 x_last = 896.5165 xn = 717.2132 i = 25 ans = -179.3033 x_last = 717.2132 xn = 573.7706 i = 26 ans = -143.4426 x_last = 573.7706 xn = 459.0164 i = 27 ans = -114.7541 x_last = 459.0164 xn = 367.2132 i = 28 ans = -91.8033 x_last = 367.2132 xn = 293.7705 i = 29 ans = -73.4426 x_last = 293.7705 xn = 235.0164 i = 30 ans = -58.7541 x_last = 235.0164 xn = 188.0132 i = 31 ans = -47.0032 x_last = 188.0132 xn = 150.4107 i = 32 ans = -37.6025 x_last = 150.4107 xn = 120.3288 i = 33 ans = -30.0818 x_last = 120.3288 xn = 96.2638 i = 34 ans = -24.0650 x_last = 96.2638 xn = 77.0128 i = 35 ans = -19.2510 x_last = 77.0128 xn = 61.6146 i = 36 ans = -15.3982 x_last = 61.6146 xn = 49.3022 i = 37 ans = -12.3124 x_last = 49.3022 xn = 39.4675 i = 38 ans = -9.8347 x_last = 39.4675 xn = 31.6366 i = 39 ans = -7.8309 x_last = 31.6366 xn = 25.4609 i = 40 ans = -6.1757 x_last = 25.4609 xn = 20.7301 i = 41 ans = -4.7308 x_last = 20.7301 xn = 17.4065 i = 42 ans = -3.3236 x_last = 17.4065 xn = 15.5796 i = 43 ans = -1.8269 x_last = 15.5796 xn = 15.0415 i = 44 ans = -0.5380 x_last = 15.0415 xn = 15.0002 i = 45 ans = -0.0413 x_last = 15.0002 xn = 15.0000 i = 46 ans = -2.2890e-04 x_last = 15.0000 xn = 15 i = 47

14   Pass
n = 9765625; assert(abs(fifth_root(n)-25)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -9765624 x_last = 1 xn = 1.9531e+06 i = 1 ans = 1.9531e+06 x_last = 1.9531e+06 xn = 1.5625e+06 i = 2 ans = -3.9063e+05 x_last = 1.5625e+06 xn = 1.2500e+06 i = 3 ans = -3.1250e+05 x_last = 1.2500e+06 xn = 1.0000e+06 i = 4 ans = -2.5000e+05 x_last = 1.0000e+06 xn = 8.0000e+05 i = 5 ans = -2.0000e+05 x_last = 8.0000e+05 xn = 6.4000e+05 i = 6 ans = -1.6000e+05 x_last = 6.4000e+05 xn = 5.1200e+05 i = 7 ans = -1.2800e+05 x_last = 5.1200e+05 xn = 4.0960e+05 i = 8 ans = -1.0240e+05 x_last = 4.0960e+05 xn = 3.2768e+05 i = 9 ans = -8.1920e+04 x_last = 3.2768e+05 xn = 2.6214e+05 i = 10 ans = -6.5536e+04 x_last = 2.6214e+05 xn = 2.0972e+05 i = 11 ans = -5.2429e+04 x_last = 2.0972e+05 xn = 1.6777e+05 i = 12 ans = -4.1943e+04 x_last = 1.6777e+05 xn = 1.3422e+05 i = 13 ans = -3.3554e+04 x_last = 1.3422e+05 xn = 1.0737e+05 i = 14 ans = -2.6844e+04 x_last = 1.0737e+05 xn = 8.5899e+04 i = 15 ans = -2.1475e+04 x_last = 8.5899e+04 xn = 6.8720e+04 i = 16 ans = -1.7180e+04 x_last = 6.8720e+04 xn = 5.4976e+04 i = 17 ans = -1.3744e+04 x_last = 5.4976e+04 xn = 4.3980e+04 i = 18 ans = -1.0995e+04 x_last = 4.3980e+04 xn = 3.5184e+04 i = 19 ans = -8.7961e+03 x_last = 3.5184e+04 xn = 2.8148e+04 i = 20 ans = -7.0369e+03 x_last = 2.8148e+04 xn = 2.2518e+04 i = 21 ans = -5.6295e+03 x_last = 2.2518e+04 xn = 1.8014e+04 i = 22 ans = -4.5036e+03 x_last = 1.8014e+04 xn = 1.4412e+04 i = 23 ans = -3.6029e+03 x_last = 1.4412e+04 xn = 1.1529e+04 i = 24 ans = -2.8823e+03 x_last = 1.1529e+04 xn = 9.2234e+03 i = 25 ans = -2.3058e+03 x_last = 9.2234e+03 xn = 7.3787e+03 i = 26 ans = -1.8447e+03 x_last = 7.3787e+03 xn = 5.9030e+03 i = 27 ans = -1.4757e+03 x_last = 5.9030e+03 xn = 4.7224e+03 i = 28 ans = -1.1806e+03 x_last = 4.7224e+03 xn = 3.7779e+03 i = 29 ans = -944.4737 x_last = 3.7779e+03 xn = 3.0223e+03 i = 30 ans = -755.5789 x_last = 3.0223e+03 xn = 2.4179e+03 i = 31 ans = -604.4632 x_last = 2.4179e+03 xn = 1.9343e+03 i = 32 ans = -483.5705 x_last = 1.9343e+03 xn = 1.5474e+03 i = 33 ans = -386.8564 x_last = 1.5474e+03 xn = 1.2379e+03 i = 34 ans = -309.4851 x_last = 1.2379e+03 xn = 990.3524 i = 35 ans = -247.5881 x_last = 990.3524 xn = 792.2820 i = 36 ans = -198.0705 x_last = 792.2820 xn = 633.8256 i = 37 ans = -158.4564 x_last = 633.8256 xn = 507.0605 i = 38 ans = -126.7651 x_last = 507.0605 xn = 405.6484 i = 39 ans = -101.4121 x_last = 405.6484 xn = 324.5188 i = 40 ans = -81.1296 x_last = 324.5188 xn = 259.6152 i = 41 ans = -64.9036 x_last = 259.6152 xn = 207.6926 i = 42 ans = -51.9226 x_last = 207.6926 xn = 166.1551 i = 43 ans = -41.5375 x_last = 166.1551 xn = 132.9267 i = 44 ans = -33.2285 x_last = 132.9267 xn = 106.3476 i = 45 ans = -26.5791 x_last = 106.3476 xn = 85.0933 i = 46 ans = -21.2542 x_last = 85.0933 xn = 68.1119 i = 47 ans = -16.9814 x_last = 68.1119 xn = 54.5803 i = 48 ans = -13.5316 x_last = 54.5803 xn = 43.8843 i = 49 ans = -10.6960 x_last = 43.8843 xn = 35.6341 i = 50 ans = -8.2502 x_last = 35.6341 xn = 29.7186 i = 51 ans = -5.9155 x_last = 29.7186 xn = 26.2788 i = 52 ans = -3.4398 x_last = 26.2788 xn = 25.1185 i = 53 ans = -1.1602 x_last = 25.1185 xn = 25.0011 i = 54 ans = -0.1174 x_last = 25.0011 xn = 25.0000 i = 55 ans = -0.0011 x_last = 25.0000 xn = 25 i = 56

15   Pass
n = 312500000; assert(abs(fifth_root(n)-50)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -312499999 x_last = 1 xn = 6.2500e+07 i = 1 ans = 6.2500e+07 x_last = 6.2500e+07 xn = 5.0000e+07 i = 2 ans = -1.2500e+07 x_last = 5.0000e+07 xn = 4.0000e+07 i = 3 ans = -1.0000e+07 x_last = 4.0000e+07 xn = 3.2000e+07 i = 4 ans = -8.0000e+06 x_last = 3.2000e+07 xn = 2.5600e+07 i = 5 ans = -6.4000e+06 x_last = 2.5600e+07 xn = 2.0480e+07 i = 6 ans = -5.1200e+06 x_last = 2.0480e+07 xn = 1.6384e+07 i = 7 ans = -4.0960e+06 x_last = 1.6384e+07 xn = 1.3107e+07 i = 8 ans = -3.2768e+06 x_last = 1.3107e+07 xn = 1.0486e+07 i = 9 ans = -2.6214e+06 x_last = 1.0486e+07 xn = 8.3886e+06 i = 10 ans = -2.0972e+06 x_last = 8.3886e+06 xn = 6.7109e+06 i = 11 ans = -1.6777e+06 x_last = 6.7109e+06 xn = 5.3687e+06 i = 12 ans = -1.3422e+06 x_last = 5.3687e+06 xn = 4.2950e+06 i = 13 ans = -1.0737e+06 x_last = 4.2950e+06 xn = 3.4360e+06 i = 14 ans = -8.5899e+05 x_last = 3.4360e+06 xn = 2.7488e+06 i = 15 ans = -6.8719e+05 x_last = 2.7488e+06 xn = 2.1990e+06 i = 16 ans = -5.4976e+05 x_last = 2.1990e+06 xn = 1.7592e+06 i = 17 ans = -4.3980e+05 x_last = 1.7592e+06 xn = 1.4074e+06 i = 18 ans = -3.5184e+05 x_last = 1.4074e+06 xn = 1.1259e+06 i = 19 ans = -2.8147e+05 x_last = 1.1259e+06 xn = 9.0072e+05 i = 20 ans = -2.2518e+05 x_last = 9.0072e+05 xn = 7.2058e+05 i = 21 ans = -1.8014e+05 x_last = 7.2058e+05 xn = 5.7646e+05 i = 22 ans = -1.4412e+05 x_last = 5.7646e+05 xn = 4.6117e+05 i = 23 ans = -1.1529e+05 x_last = 4.6117e+05 xn = 3.6893e+05 i = 24 ans = -9.2234e+04 x_last = 3.6893e+05 xn = 2.9515e+05 i = 25 ans = -7.3787e+04 x_last = 2.9515e+05 xn = 2.3612e+05 i = 26 ans = -5.9030e+04 x_last = 2.3612e+05 xn = 1.8889e+05 i = 27 ans = -4.7224e+04 x_last = 1.8889e+05 xn = 1.5112e+05 i = 28 ans = -3.7779e+04 x_last = 1.5112e+05 xn = 1.2089e+05 i = 29 ans = -3.0223e+04 x_last = 1.2089e+05 xn = 9.6714e+04 i = 30 ans = -2.4179e+04 x_last = 9.6714e+04 xn = 7.7371e+04 i = 31 ans = -1.9343e+04 x_last = 7.7371e+04 xn = 6.1897e+04 i = 32 ans = -1.5474e+04 x_last = 6.1897e+04 xn = 4.9518e+04 i = 33 ans = -1.2379e+04 x_last = 4.9518e+04 xn = 3.9614e+04 i = 34 ans = -9.9035e+03 x_last = 3.9614e+04 xn = 3.1691e+04 i = 35 ans = -7.9228e+03 x_last = 3.1691e+04 xn = 2.5353e+04 i = 36 ans = -6.3383e+03 x_last = 2.5353e+04 xn = 2.0282e+04 i = 37 ans = -5.0706e+03 x_last = 2.0282e+04 xn = 1.6226e+04 i = 38 ans = -4.0565e+03 x_last = 1.6226e+04 xn = 1.2981e+04 i = 39 ans = -3.2452e+03 x_last = 1.2981e+04 xn = 1.0385e+04 i = 40 ans = -2.5961e+03 x_last = 1.0385e+04 xn = 8.3077e+03 i = 41 ans = -2.0769e+03 x_last = 8.3077e+03 xn = 6.6461e+03 i = 42 ans = -1.6615e+03 x_last = 6.6461e+03 xn = 5.3169e+03 i = 43 ans = -1.3292e+03 x_last = 5.3169e+03 xn = 4.2535e+03 i = 44 ans = -1.0634e+03 x_last = 4.2535e+03 xn = 3.4028e+03 i = 45 ans = -850.7059 x_last = 3.4028e+03 xn = 2.7223e+03 i = 46 ans = -680.5647 x_last = 2.7223e+03 xn = 2.1778e+03 i = 47 ans = -544.4518 x_last = 2.1778e+03 xn = 1.7422e+03 i = 48 ans = -435.5614 x_last = 1.7422e+03 xn = 1.3938e+03 i = 49 ans = -348.4491 x_last = 1.3938e+03 xn = 1.1150e+03 i = 50 ans = -278.7593 x_last = 1.1150e+03 xn = 892.0299 i = 51 ans = -223.0074 x_last = 892.0299 xn = 713.6240 i = 52 ans = -178.4059 x_last = 713.6240 xn = 570.8994 i = 53 ans = -142.7246 x_last = 570.8994 xn = 456.7201 i = 54 ans = -114.1793 x_last = 456.7201 xn = 365.3776 i = 55 ans = -91.3426 x_last = 365.3776 xn = 292.3055 i = 56 ans = -73.0720 x_last = 292.3055 xn = 233.8530 i = 57 ans = -58.4525 x_last = 233.8530 xn = 187.1033 i = 58 ans = -46.7497 x_last = 187.1033 xn = 149.7336 i = 59 ans = -37.3697 x_last = 149.7336 xn = 119.9112 i = 60 ans = -29.8224 x_last = 119.9112 xn = 96.2313 i = 61 ans = -23.6799 x_last = 96.2313 xn = 77.7138 i = 62 ans = -18.5174 x_last = 77.7138 xn = 63.8846 i = 63 ans = -13.8293 x_last = 63.8846 xn = 54.8600 i = 64 ans = -9.0246 x_last = 54.8600 xn = 50.7881 i = 65 ans = -4.0718 x_last = 50.7881 xn = 50.0241 i = 66 ans = -0.7640 x_last = 50.0241 xn = 50.0000 i = 67 ans = -0.0241 x_last = 50.0000 xn = 50.0000 i = 68 ans = -2.3176e-05 x_last = 50.0000 xn = 50 i = 69

16   Pass
n = 75937500000; assert(abs(fifth_root(n)-150)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -7.5937e+10 x_last = 1 xn = 1.5188e+10 i = 1 ans = 1.5187e+10 x_last = 1.5188e+10 xn = 1.2150e+10 i = 2 ans = -3.0375e+09 x_last = 1.2150e+10 xn = 9.7200e+09 i = 3 ans = -2.4300e+09 x_last = 9.7200e+09 xn = 7.7760e+09 i = 4 ans = -1.9440e+09 x_last = 7.7760e+09 xn = 6.2208e+09 i = 5 ans = -1.5552e+09 x_last = 6.2208e+09 xn = 4.9766e+09 i = 6 ans = -1.2442e+09 x_last = 4.9766e+09 xn = 3.9813e+09 i = 7 ans = -9.9533e+08 x_last = 3.9813e+09 xn = 3.1850e+09 i = 8 ans = -7.9626e+08 x_last = 3.1850e+09 xn = 2.5480e+09 i = 9 ans = -6.3701e+08 x_last = 2.5480e+09 xn = 2.0384e+09 i = 10 ans = -5.0961e+08 x_last = 2.0384e+09 xn = 1.6307e+09 i = 11 ans = -4.0769e+08 x_last = 1.6307e+09 xn = 1.3046e+09 i = 12 ans = -3.2615e+08 x_last = 1.3046e+09 xn = 1.0437e+09 i = 13 ans = -2.6092e+08 x_last = 1.0437e+09 xn = 8.3494e+08 i = 14 ans = -2.0874e+08 x_last = 8.3494e+08 xn = 6.6795e+08 i = 15 ans = -1.6699e+08 x_last = 6.6795e+08 xn = 5.3436e+08 i = 16 ans = -1.3359e+08 x_last = 5.3436e+08 xn = 4.2749e+08 i = 17 ans = -1.0687e+08 x_last = 4.2749e+08 xn = 3.4199e+08 i = 18 ans = -8.5498e+07 x_last = 3.4199e+08 xn = 2.7359e+08 i = 19 ans = -6.8398e+07 x_last = 2.7359e+08 xn = 2.1887e+08 i = 20 ans = -5.4719e+07 x_last = 2.1887e+08 xn = 1.7510e+08 i = 21 ans = -4.3775e+07 x_last = 1.7510e+08 xn = 1.4008e+08 i = 22 ans = -3.5020e+07 x_last = 1.4008e+08 xn = 1.1206e+08 i = 23 ans = -2.8016e+07 x_last = 1.1206e+08 xn = 8.9651e+07 i = 24 ans = -2.2413e+07 x_last = 8.9651e+07 xn = 7.1721e+07 i = 25 ans = -1.7930e+07 x_last = 7.1721e+07 xn = 5.7377e+07 i = 26 ans = -1.4344e+07 x_last = 5.7377e+07 xn = 4.5901e+07 i = 27 ans = -1.1475e+07 x_last = 4.5901e+07 xn = 3.6721e+07 i = 28 ans = -9.1803e+06 x_last = 3.6721e+07 xn = 2.9377e+07 i = 29 ans = -7.3442e+06 x_last = 2.9377e+07 xn = 2.3502e+07 i = 30 ans = -5.8754e+06 x_last = 2.3502e+07 xn = 1.8801e+07 i = 31 ans = -4.7003e+06 x_last = 1.8801e+07 xn = 1.5041e+07 i = 32 ans = -3.7602e+06 x_last = 1.5041e+07 xn = 1.2033e+07 i = 33 ans = -3.0082e+06 x_last = 1.2033e+07 xn = 9.6262e+06 i = 34 ans = -2.4066e+06 x_last = 9.6262e+06 xn = 7.7010e+06 i = 35 ans = -1.9252e+06 x_last = 7.7010e+06 xn = 6.1608e+06 i = 36 ans = -1.5402e+06 x_last = 6.1608e+06 xn = 4.9286e+06 i = 37 ans = -1.2322e+06 x_last = 4.9286e+06 xn = 3.9429e+06 i = 38 ans = -9.8573e+05 x_last = 3.9429e+06 xn = 3.1543e+06 i = 39 ans = -7.8858e+05 x_last = 3.1543e+06 xn = 2.5235e+06 i = 40 ans = -6.3086e+05 x_last = 2.5235e+06 xn = 2.0188e+06 i = 41 ans = -5.0469e+05 x_last = 2.0188e+06 xn = 1.6150e+06 i = 42 ans = -4.0375e+05 x_last = 1.6150e+06 xn = 1.2920e+06 i = 43 ans = -3.2300e+05 x_last = 1.2920e+06 xn = 1.0336e+06 i = 44 ans = -2.5840e+05 x_last = 1.0336e+06 xn = 8.2689e+05 i = 45 ans = -2.0672e+05 x_last = 8.2689e+05 xn = 6.6151e+05 i = 46 ans = -1.6538e+05 x_last = 6.6151e+05 xn = 5.2921e+05 i = 47 ans = -1.3230e+05 x_last = 5.2921e+05 xn = 4.2337e+05 i = 48 ans = -1.0584e+05 x_last = 4.2337e+05 xn = 3.3869e+05 i = 49 ans = -8.4673e+04 x_last = 3.3869e+05 xn = 2.7095e+05 i = 50 ans = -6.7739e+04 x_last = 2.7095e+05 xn = 2.1676e+05 i = 51 ans = -5.4191e+04 x_last = 2.1676e+05 xn = 1.7341e+05 i = 52 ans = -4.3353e+04 x_last = 1.7341e+05 xn = 1.3873e+05 i = 53 ans = -3.4682e+04 x_last = 1.3873e+05 xn = 1.1098e+05 i = 54 ans = -2.7746e+04 x_last = 1.1098e+05 xn = 8.8786e+04 i = 55 ans = -2.2197e+04 x_last = 8.8786e+04 xn = 7.1029e+04 i = 56 ans = -1.7757e+04 x_last = 7.1029e+04 xn = 5.6823e+04 i = 57 ans = -1.4206e+04 x_last = 5.6823e+04 xn = 4.5459e+04 i = 58 ans = -1.1365e+04 x_last = 4.5459e+04 xn = 3.6367e+04 i = 59 ans = -9.0917e+03 x_last = 3.6367e+04 xn = 2.9093e+04 i = 60 ans = -7.2734e+03 x_last = 2.9093e+04 xn = 2.3275e+04 i = 61 ans = -5.8187e+03 x_last = 2.3275e+04 xn = 1.8620e+04 i = 62 ans = -4.6550e+03 x_last = 1.8620e+04 xn = 1.4896e+04 i = 63 ans = -3.7240e+03 x_last = 1.4896e+04 xn = 1.1917e+04 i = 64 ans = -2.9792e+03 x_last = 1.1917e+04 xn = 9.5333e+03 i = 65 ans = -2.3833e+03 x_last = 9.5333e+03 xn = 7.6267e+03 i = 66 ans = -1.9067e+03 x_last = 7.6267e+03 xn = 6.1013e+03 i = 67 ans = -1.5253e+03 x_last = 6.1013e+03 xn = 4.8811e+03 i = 68 ans = -1.2203e+03 x_last = 4.8811e+03 xn = 3.9049e+03 i = 69 ans = -976.2148 x_last = 3.9049e+03 xn = 3.1239e+03 i = 70 ans = -780.9718 x_last = 3.1239e+03 xn = 2.4991e+03 i = 71 ans = -624.7774 x_last = 2.4991e+03 xn = 1.9993e+03 i = 72 ans = -499.8217 x_last = 1.9993e+03 xn = 1.5994e+03 i = 73 ans = -399.8568 x_last = 1.5994e+03 xn = 1.2795e+03 i = 74 ans = -319.8840 x_last = 1.2795e+03 xn = 1.0236e+03 i = 75 ans = -255.9039 x_last = 1.0236e+03 xn = 818.9290 i = 76 ans = -204.7149 x_last = 818.9290 xn = 655.1769 i = 77 ans = -163.7520 x_last = 655.1769 xn = 524.2240 i = 78 ans = -130.9530 x_last = 524.2240 xn = 419.5803 i = 79 ans = -104.6437 x_last = 419.5803 xn = 336.1543 i = 80 ans = -83.4260 x_last = 336.1543 xn = 270.1128 i = 81 ans = -66.0414 x_last = 270.1128 xn = 218.9433 i = 82 ans = -51.1695 x_last = 218.9433 xn = 181.7640 i = 83 ans = -37.1793 x_last = 181.7640 xn = 159.3253 i = 84 ans = -22.4387 x_last = 159.3253 xn = 151.0296 i = 85 ans = -8.2957 x_last = 151.0296 xn = 150.0139 i = 86 ans = -1.0156 x_last = 150.0139 xn = 150.0000 i = 87 ans = -0.0139 x_last = 150.0000 xn = 150.0000 i = 88

17   Pass
n = 31250000000000; assert(abs(fifth_root(n)-500)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -3.1250e+13 x_last = 1 xn = 6.2500e+12 i = 1 ans = 6.2500e+12 x_last = 6.2500e+12 xn = 5.0000e+12 i = 2 ans = -1.2500e+12 x_last = 5.0000e+12 xn = 4.0000e+12 i = 3 ans = -1.0000e+12 x_last = 4.0000e+12 xn = 3.2000e+12 i = 4 ans = -8.0000e+11 x_last = 3.2000e+12 xn = 2.5600e+12 i = 5 ans = -6.4000e+11 x_last = 2.5600e+12 xn = 2.0480e+12 i = 6 ans = -5.1200e+11 x_last = 2.0480e+12 xn = 1.6384e+12 i = 7 ans = -4.0960e+11 x_last = 1.6384e+12 xn = 1.3107e+12 i = 8 ans = -3.2768e+11 x_last = 1.3107e+12 xn = 1.0486e+12 i = 9 ans = -2.6214e+11 x_last = 1.0486e+12 xn = 8.3886e+11 i = 10 ans = -2.0972e+11 x_last = 8.3886e+11 xn = 6.7109e+11 i = 11 ans = -1.6777e+11 x_last = 6.7109e+11 xn = 5.3687e+11 i = 12 ans = -1.3422e+11 x_last = 5.3687e+11 xn = 4.2950e+11 i = 13 ans = -1.0737e+11 x_last = 4.2950e+11 xn = 3.4360e+11 i = 14 ans = -8.5899e+10 x_last = 3.4360e+11 xn = 2.7488e+11 i = 15 ans = -6.8719e+10 x_last = 2.7488e+11 xn = 2.1990e+11 i = 16 ans = -5.4976e+10 x_last = 2.1990e+11 xn = 1.7592e+11 i = 17 ans = -4.3980e+10 x_last = 1.7592e+11 xn = 1.4074e+11 i = 18 ans = -3.5184e+10 x_last = 1.4074e+11 xn = 1.1259e+11 i = 19 ans = -2.8147e+10 x_last = 1.1259e+11 xn = 9.0072e+10 i = 20 ans = -2.2518e+10 x_last = 9.0072e+10 xn = 7.2058e+10 i = 21 ans = -1.8014e+10 x_last = 7.2058e+10 xn = 5.7646e+10 i = 22 ans = -1.4412e+10 x_last = 5.7646e+10 xn = 4.6117e+10 i = 23 ans = -1.1529e+10 x_last = 4.6117e+10 xn = 3.6893e+10 i = 24 ans = -9.2234e+09 x_last = 3.6893e+10 xn = 2.9515e+10 i = 25 ans = -7.3787e+09 x_last = 2.9515e+10 xn = 2.3612e+10 i = 26 ans = -5.9030e+09 x_last = 2.3612e+10 xn = 1.8889e+10 i = 27 ans = -4.7224e+09 x_last = 1.8889e+10 xn = 1.5112e+10 i = 28 ans = -3.7779e+09 x_last = 1.5112e+10 xn = 1.2089e+10 i = 29 ans = -3.0223e+09 x_last = 1.2089e+10 xn = 9.6714e+09 i = 30 ans = -2.4179e+09 x_last = 9.6714e+09 xn = 7.7371e+09 i = 31 ans = -1.9343e+09 x_last = 7.7371e+09 xn = 6.1897e+09 i = 32 ans = -1.5474e+09 x_last = 6.1897e+09 xn = 4.9518e+09 i = 33 ans = -1.2379e+09 x_last = 4.9518e+09 xn = 3.9614e+09 i = 34 ans = -9.9035e+08 x_last = 3.9614e+09 xn = 3.1691e+09 i = 35 ans = -7.9228e+08 x_last = 3.1691e+09 xn = 2.5353e+09 i = 36 ans = -6.3383e+08 x_last = 2.5353e+09 xn = 2.0282e+09 i = 37 ans = -5.0706e+08 x_last = 2.0282e+09 xn = 1.6226e+09 i = 38 ans = -4.0565e+08 x_last = 1.6226e+09 xn = 1.2981e+09 i = 39 ans = -3.2452e+08 x_last = 1.2981e+09 xn = 1.0385e+09 i = 40 ans = -2.5961e+08 x_last = 1.0385e+09 xn = 8.3077e+08 i = 41 ans = -2.0769e+08 x_last = 8.3077e+08 xn = 6.6461e+08 i = 42 ans = -1.6615e+08 x_last = 6.6461e+08 xn = 5.3169e+08 i = 43 ans = -1.3292e+08 x_last = 5.3169e+08 xn = 4.2535e+08 i = 44 ans = -1.0634e+08 x_last = 4.2535e+08 xn = 3.4028e+08 i = 45 ans = -8.5071e+07 x_last = 3.4028e+08 xn = 2.7223e+08 i = 46 ans = -6.8056e+07 x_last = 2.7223e+08 xn = 2.1778e+08 i = 47 ans = -5.4445e+07 x_last = 2.1778e+08 xn = 1.7422e+08 i = 48 ans = -4.3556e+07 x_last = 1.7422e+08 xn = 1.3938e+08 i = 49 ans = -3.4845e+07 x_last = 1.3938e+08 xn = 1.1150e+08 i = 50 ans = -2.7876e+07 x_last = 1.1150e+08 xn = 8.9203e+07 i = 51 ans = -2.2301e+07 x_last = 8.9203e+07 xn = 7.1362e+07 i = 52 ans = -1.7841e+07 x_last = 7.1362e+07 xn = 5.7090e+07 i = 53 ans = -1.4272e+07 x_last = 5.7090e+07 xn = 4.5672e+07 i = 54 ans = -1.1418e+07 x_last = 4.5672e+07 xn = 3.6538e+07 i = 55 ans = -9.1344e+06 x_last = 3.6538e+07 xn = 2.9230e+07 i = 56 ans = -7.3075e+06 x_last = 2.9230e+07 xn = 2.3384e+07 i = 57 ans = -5.8460e+06 x_last = 2.3384e+07 xn = 1.8707e+07 i = 58 ans = -4.6768e+06 x_last = 1.8707e+07 xn = 1.4966e+07 i = 59 ans = -3.7414e+06 x_last = 1.4966e+07 xn = 1.1973e+07 i = 60 ans = -2.9932e+06 x_last = 1.1973e+07 xn = 9.5781e+06 i = 61 ans = -2.3945e+06 x_last = 9.5781e+06 xn = 7.6625e+06 i = 62 ans = -1.9156e+06 x_last = 7.6625e+06 xn = 6.1300e+06 i = 63 ans = -1.5325e+06 x_last = 6.1300e+06 xn = 4.9040e+06 i = 64 ans = -1.2260e+06 x_last = 4.9040e+06 xn = 3.9232e+06 i = 65 ans = -9.8080e+05 x_last = 3.9232e+06 xn = 3.1386e+06 i = 66 ans = -7.8464e+05 x_last = 3.1386e+06 xn = 2.5108e+06 i = 67 ans = -6.2771e+05 x_last = 2.5108e+06 xn = 2.0087e+06 i = 68 ans = -5.0217e+05 x_last = 2.0087e+06 xn = 1.6069e+06 i = 69 ans = -4.0173e+05 x_last = 1.6069e+06 xn = 1.2856e+06 i = 70 ans = -3.2139e+05 x_last = 1.2856e+06 xn = 1.0284e+06 i = 71 ans = -2.5711e+05 x_last = 1.0284e+06 xn = 8.2275e+05 i = 72 ans = -2.0569e+05 x_last = 8.2275e+05 xn = 6.5820e+05 i = 73 ans = -1.6455e+05 x_last = 6.5820e+05 xn = 5.2656e+05 i = 74 ans = -1.3164e+05 x_last = 5.2656e+05 xn = 4.2125e+05 i = 75 ans = -1.0531e+05 x_last = 4.2125e+05 xn = 3.3700e+05 i = 76 ans = -8.4250e+04 x_last = 3.3700e+05 xn = 2.6960e+05 i = 77 ans = -6.7400e+04 x_last = 2.6960e+05 xn = 2.1568e+05 i = 78 ans = -5.3920e+04 x_last = 2.1568e+05 xn = 1.7254e+05 i = 79 ans = -4.3136e+04 x_last = 1.7254e+05 xn = 1.3803e+05 i = 80 ans = -3.4509e+04 x_last = 1.3803e+05 xn = 1.1043e+05 i = 81 ans = -2.7607e+04 x_last = 1.1043e+05 xn = 8.8342e+04 i = 82 ans = -2.2086e+04 x_last = 8.8342e+04 xn = 7.0674e+04 i = 83 ans = -1.7668e+04 x_last = 7.0674e+04 xn = 5.6539e+04 i = 84 ans = -1.4135e+04 x_last = 5.6539e+04 xn = 4.5231e+04 i = 85 ans = -1.1308e+04 x_last = 4.5231e+04 xn = 3.6185e+04 i = 86 ans = -9.0463e+03 x_last = 3.6185e+04 xn = 2.8948e+04 i = 87 ans = -7.2370e+03 x_last = 2.8948e+04 xn = 2.3158e+04 i = 88 ans = -5.7896e+03 x_last = 2.3158e+04 xn = 1.8527e+04 i = 89 ans = -4.6317e+03 x_last = 1.8527e+04 xn = 1.4821e+04 i = 90 ans = -3.7053e+03 x_last = 1.4821e+04 xn = 1.1857e+04 i = 91 ans = -2.9643e+03 x_last = 1.1857e+04 xn = 9.4857e+03 i = 92 ans = -2.3714e+03 x_last = 9.4857e+03 xn = 7.5886e+03 i = 93 ans = -1.8971e+03 x_last = 7.5886e+03 xn = 6.0708e+03 i = 94 ans = -1.5177e+03 x_last = 6.0708e+03 xn = 4.8567e+03 i = 95 ans = -1.2142e+03 x_last = 4.8567e+03 xn = 3.8854e+03 i = 96 ans = -971.3246 x_last = 3.8854e+03 xn = 3.1083e+03 i = 97 ans = -777.0435 x_last = 3.1083e+03 xn = 2.4867e+03 i = 98 ans = -621.5952 x_last = 2.4867e+03 xn = 1.9895e+03 i = 99 ans = -497.1797 x_last = 1.9895e+03 xn = 1.5920e+03 i = 100 ans = -397.5083 x_last = 1.5920e+03 xn = 1.2746e+03 i = 101 ans = -317.4326 x_last = 1.2746e+03 xn = 1.0220e+03 i = 102 ans = -252.5510 x_last = 1.0220e+03 xn = 823.3633 i = 103 ans = -198.6809 x_last = 823.3633 xn = 672.2899 i = 104 ans = -151.0734 x_last = 672.2899 xn = 568.4271 i = 105 ans = -103.8627 x_last = 568.4271 xn = 514.6078 i = 106 ans = -53.8193 x_last = 514.6078 xn = 500.8061 i = 107 ans = -13.8017 x_last = 500.8061 xn = 500.0026 i = 108 ans = -0.8035 x_last = 500.0026 xn = 500.0000 i = 109 ans = -0.0026 x_last = 500.0000 xn = 500 i = 110

18   Pass
n = 52658067346875; assert(abs(fifth_root(n)-555)<1e-5)

X = function_handle with value: @(xn,g)xn-(xn^5-g)/(5*xn^(4)) ans = -5.2658e+13 x_last = 1 xn = 1.0532e+13 i = 1 ans = 1.0532e+13 x_last = 1.0532e+13 xn = 8.4253e+12 i = 2 ans = -2.1063e+12 x_last = 8.4253e+12 xn = 6.7402e+12 i = 3 ans = -1.6851e+12 x_last = 6.7402e+12 xn = 5.3922e+12 i = 4 ans = -1.3480e+12 x_last = 5.3922e+12 xn = 4.3137e+12 i = 5 ans = -1.0784e+12 x_last = 4.3137e+12 xn = 3.4510e+12 i = 6 ans = -8.6275e+11 x_last = 3.4510e+12 xn = 2.7608e+12 i = 7 ans = -6.9020e+11 x_last = 2.7608e+12 xn = 2.2086e+12 i = 8 ans = -5.5216e+11 x_last = 2.2086e+12 xn = 1.7669e+12 i = 9 ans = -4.4173e+11 x_last = 1.7669e+12 xn = 1.4135e+12 i = 10 ans = -3.5338e+11 x_last = 1.4135e+12 xn = 1.1308e+12 i = 11 ans = -2.8271e+11 x_last = 1.1308e+12 xn = 9.0466e+11 i = 12 ans = -2.2616e+11 x_last = 9.0466e+11 xn = 7.2373e+11 i = 13 ans = -1.8093e+11 x_last = 7.2373e+11 xn = 5.7898e+11 i = 14 ans = -1.4475e+11 x_last = 5.7898e+11 xn = 4.6319e+11 i = 15 ans = -1.1580e+11 x_last = 4.6319e+11 xn = 3.7055e+11 i = 16 ans = -9.2637e+10 x_last = 3.7055e+11 xn = 2.9644e+11 i = 17 ans = -7.4110e+10 x_last = 2.9644e+11 xn = 2.3715e+11 i = 18 ans = -5.9288e+10 x_last = 2.3715e+11 xn = 1.8972e+11 i = 19 ans = -4.7430e+10 x_last = 1.8972e+11 xn = 1.5178e+11 i = 20 ans = -3.7944e+10 x_last = 1.5178e+11 xn = 1.2142e+11 i = 21 ans = -3.0355e+10 x_last = 1.2142e+11 xn = 9.7137e+10 i = 22 ans = -2.4284e+10 x_last = 9.7137e+10 xn = 7.7710e+10 i = 23 ans = -1.9427e+10 x_last = 7.7710e+10 xn = 6.2168e+10 i = 24 ans = -1.5542e+10 x_last = 6.2168e+10 xn = 4.9734e+10 i = 25 ans = -1.2434e+10 x_last = 4.9734e+10 xn = 3.9787e+10 i = 26 ans = -9.9468e+09 x_last = 3.9787e+10 xn = 3.1830e+10 i = 27 ans = -7.9575e+09 x_last = 3.1830e+10 xn = 2.5464e+10 i = 28 ans = -6.3660e+09 x_last = 2.5464e+10 xn = 2.0371e+10 i = 29 ans = -5.0928e+09 x_last = 2.0371e+10 xn = 1.6297e+10 i = 30 ans = -4.0742e+09 x_last = 1.6297e+10 xn = 1.3038e+10 i = 31 ans = -3.2594e+09 x_last = 1.3038e+10 xn = 1.0430e+10 i = 32 ans = -2.6075e+09 x_last = 1.0430e+10 xn = 8.3440e+09 i = 33 ans = -2.0860e+09 x_last = 8.3440e+09 xn = 6.6752e+09 i = 34 ans = -1.6688e+09 x_last = 6.6752e+09 xn = 5.3402e+09 i = 35 ans = -1.3350e+09 x_last = 5.3402e+09 xn = 4.2721e+09 i = 36 ans = -1.0680e+09 x_last = 4.2721e+09 xn = 3.4177e+09 i = 37 ans = -8.5443e+08 x_last = 3.4177e+09 xn = 2.7342e+09 i = 38 ans = -6.8354e+08 x_last = 2.7342e+09 xn = 2.1873e+09 i = 39 ans = -5.4683e+08 x_last = 2.1873e+09 xn = 1.7499e+09 i = 40 ans = -4.3747e+08 x_last = 1.7499e+09 xn = 1.3999e+09 i = 41 ans = -3.4997e+08 x_last = 1.3999e+09 xn = 1.1199e+09 i = 42 ans = -2.7998e+08 x_last = 1.1199e+09 xn = 8.9593e+08 i = 43 ans = -2.2398e+08 x_last = 8.9593e+08 xn = 7.1674e+08 i = 44 ans = -1.7919e+08 x_last = 7.1674e+08 xn = 5.7340e+08 i = 45 ans = -1.4335e+08 x_last = 5.7340e+08 xn = 4.5872e+08 i = 46 ans = -1.1468e+08 x_last = 4.5872e+08 xn = 3.6697e+08 i = 47 ans = -9.1743e+07 x_last = 3.6697e+08 xn = 2.9358e+08 i = 48 ans = -7.3395e+07 x_last = 2.9358e+08 xn = 2.3486e+08 i = 49 ans = -5.8716e+07 x_last = 2.3486e+08 xn = 1.8789e+08 i = 50 ans = -4.6973e+07 x_last = 1.8789e+08 xn = 1.5031e+08 i = 51 ans = -3.7578e+07 x_last = 1.5031e+08 xn = 1.2025e+08 i = 52 ans = -3.0062e+07 x_last = 1.2025e+08 xn = 9.6200e+07 i = 53 ans = -2.4050e+07 x_last = 9.6200e+07 xn = 7.6960e+07 i = 54 ans = -1.9240e+07 x_last = 7.6960e+07 xn = 6.1568e+07 i = 55 ans = -1.5392e+07 x_last = 6.1568e+07 xn = 4.9254e+07 i = 56 ans = -1.2314e+07 x_last = 4.9254e+07 xn = 3.9403e+07 i = 57 ans = -9.8509e+06 x_last = 3.9403e+07 xn = 3.1523e+07 i = 58 ans = -7.8807e+06 x_last = 3.1523e+07 xn = 2.5218e+07 i = 59 ans = -6.3046e+06 x_last = 2.5218e+07 xn = 2.0175e+07 i = 60 ans = -5.0436e+06 x_last = 2.0175e+07 xn = 1.6140e+07 i = 61 ans = -4.0349e+06 x_last = 1.6140e+07 xn = 1.2912e+07 i = 62 ans = -3.2279e+06 x_last = 1.2912e+07 xn = 1.0329e+07 i = 63 ans = -2.5823e+06 x_last = 1.0329e+07 xn = 8.2635e+06 i = 64 ans = -2.0659e+06 x_last = 8.2635e+06 xn = 6.6108e+06 i = 65 ans = -1.6527e+06 x_last = 6.6108e+06 xn = 5.2886e+06 i = 66 ans = -1.3222e+06 x_last = 5.2886e+06 xn = 4.2309e+06 i = 67 ans = -1.0577e+06 x_last = 4.2309e+06 xn = 3.3847e+06 i = 68 ans = -8.4618e+05 x_last = 3.3847e+06 xn = 2.7078e+06 i = 69 ans = -6.7695e+05 x_last = 2.7078e+06 xn = 2.1662e+06 i = 70 ans = -5.4156e+05 x_last = 2.1662e+06 xn = 1.7330e+06 i = 71 ans = -4.3325e+05 x_last = 1.7330e+06 xn = 1.3864e+06 i = 72 ans = -3.4660e+05 x_last = 1.3864e+06 xn = 1.1091e+06 i = 73 ans = -2.7728e+05 x_last = 1.1091e+06 xn = 8.8729e+05 i = 74 ans = -2.2182e+05 x_last = 8.8729e+05 xn = 7.0983e+05 i = 75 ans = -1.7746e+05 x_last = 7.0983e+05 xn = 5.6786e+05 i = 76 ans = -1.4197e+05 x_last = 5.6786e+05 xn = 4.5429e+05 i = 77 ans = -1.1357e+05 x_last = 4.5429e+05 xn = 3.6343e+05 i = 78 ans = -9.0858e+04 x_last = 3.6343e+05 xn = 2.9075e+05 i = 79 ans = -7.2687e+04 x_last = 2.9075e+05 xn = 2.3260e+05 i = 80 ans = -5.8149e+04 x_last = 2.3260e+05 xn = 1.8608e+05 i = 81 ans = -4.6519e+04 x_last = 1.8608e+05 xn = 1.4886e+05 i = 82 ans = -3.7216e+04 x_last = 1.4886e+05 xn = 1.1909e+05 i = 83 ans = -2.9772e+04 x_last = 1.1909e+05 xn = 9.5272e+04 i = 84 ans = -2.3818e+04 x_last = 9.5272e+04 xn = 7.6217e+04 i = 85 ans = -1.9054e+04 x_last = 7.6217e+04 xn = 6.0974e+04 i = 86 ans = -1.5243e+04 x_last = 6.0974e+04 xn = 4.8779e+04 i = 87 ans = -1.2195e+04 x_last = 4.8779e+04 xn = 3.9023e+04 i = 88 ans = -9.7558e+03 x_last = 3.9023e+04 xn = 3.1219e+04 i = 89 ans = -7.8047e+03 x_last = 3.1219e+04 xn = 2.4975e+04 i = 90 ans = -6.2437e+03 x_last = 2.4975e+04 xn = 1.9980e+04 i = 91 ans = -4.9950e+03 x_last = 1.9980e+04 xn = 1.5984e+04 i = 92 ans = -3.9960e+03 x_last = 1.5984e+04 xn = 1.2787e+04 i = 93 ans = -3.1968e+03 x_last = 1.2787e+04 xn = 1.0230e+04 i = 94 ans = -2.5574e+03 x_last = 1.0230e+04 xn = 8.1838e+03 i = 95 ans = -2.0459e+03 x_last = 8.1838e+03 xn = 6.5470e+03 i = 96 ans = -1.6368e+03 x_last = 6.5470e+03 xn = 5.2376e+03 i = 97 ans = -1.3094e+03 x_last = 5.2376e+03 xn = 4.1901e+03 i = 98 ans = -1.0475e+03 x_last = 4.1901e+03 xn = 3.3521e+03 i = 99 ans = -837.9886 x_last = 3.3521e+03 xn = 2.6818e+03 i = 100 ans = -670.3416 x_last = 2.6818e+03 xn = 2.1456e+03 i = 101 ans = -536.1531 x_last = 2.1456e+03 xn = 1.7170e+03 i = 102 ans = -428.6292 x_last = 1.7170e+03 xn = 1.3748e+03 i = 103 ans = -342.1885 x_last = 1.3748e+03 xn = 1.1028e+03 i = 104 ans = -272.0146 x_last = 1.1028e+03 xn = 889.3590 i = 105 ans = -213.4391 x_last = 889.3590 xn = 728.3212 i = 106 ans = -161.0378 x_last = 728.3212 xn = 620.0855 i = 107 ans = -108.2357 x_last = 620.0855 xn = 567.3026 i = 108 ans = -52.7829 x_last = 567.3026 xn = 555.5221 i = 109 ans = -11.7805 x_last = 555.5221 xn = 555.0010 i = 110 ans = -0.5212 x_last = 555.0010 xn = 555.0000 i = 111 ans = -9.8062e-04 x_last = 555.0000 xn = 555 i = 112