Test  Status  Code Input and Output 

1  Pass 
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')

2  Fail 
n = 1/9765625;
assert(abs(fifth_root(n)1/25)<1e5)
a =
3.2000e04
a =
0.0179
b =
3.2000e04
b =
0.0179

3  Fail 
n = 1/5555;
assert(abs(fifth_root(n)0.178263811215444)<1e5)
a =
0.0134
a =
0.1158
b =
0.0134
b =
0.1158

4  Fail 
n = 1/3125;
assert(abs(fifth_root(n)1/5)<1e5)
a =
0.0179
a =
0.1337
b =
0.0179
b =
0.1337

5  Fail 
n = 1/125;
assert(abs(fifth_root(n)0.380730787743176)<1e5)
a =
0.0894
a =
0.2991
b =
0.0894
b =
0.2991

6  Fail 
n = 1/5;
assert(abs(fifth_root(n)0.724779663677696)<1e5)
a =
0.4472
a =
0.6687
b =
0.4472
b =
0.6687

7  Fail 
n = 1;
assert(abs(fifth_root(n)1)<1e5)
a =
1
a =
1
b =
1
b =
1

8  Fail 
n = 5;
assert(abs(fifth_root(n)1.37972966146121)<1e5)
a =
2.2361
a =
1.4953
b =
2.2361
b =
1.4953

9  Fail 
n = 25;
assert(abs(fifth_root(n)1.90365393871588)<1e5)
a =
5
a =
2.2361
b =
5
b =
2.2361

10  Fail 
n = 50;
assert(abs(fifth_root(n)2.18672414788656)<1e5)
a =
7.0711
a =
2.6591
b =
7.0711
b =
2.6591

11  Fail 
n = 500;
assert(abs(fifth_root(n)3.46572421577573)<1e5)
a =
22.3607
a =
4.7287
b =
22.3607
b =
4.7287

12  Fail 
n = 3125;
assert(abs(fifth_root(n)5)<1e5)
a =
55.9017
a =
7.4767
b =
55.9017
b =
7.4767

13  Fail 
n = 759375;
assert(abs(fifth_root(n)15)<1e5)
a =
871.4213
a =
29.5198
b =
871.4213
b =
29.5198

14  Fail 
n = 9765625;
assert(abs(fifth_root(n)25)<1e5)
a =
3125
a =
55.9017
b =
3125
b =
55.9017

15  Fail 
n = 312500000;
assert(abs(fifth_root(n)50)<1e5)
a =
1.7678e+04
a =
132.9574
b =
1.7678e+04
b =
132.9574

16  Fail 
n = 75937500000;
assert(abs(fifth_root(n)150)<1e5)
a =
2.7557e+05
a =
524.9453
b =
2.7557e+05
b =
524.9453

17  Fail 
n = 31250000000000;
assert(abs(fifth_root(n)500)<1e5)
a =
5.5902e+06
a =
2.3644e+03
b =
5.5902e+06
b =
2.3644e+03

18  Fail 
n = 52658067346875;
assert(abs(fifth_root(n)555)<1e5)
a =
7.2566e+06
a =
2.6938e+03
b =
7.2566e+06
b =
2.6938e+03

2347 Solvers
Get the elements of diagonal and antidiagonal for any mbyn matrix
292 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
601 Solvers
300 Solvers
Solving Quadratic Equations (Version 1)
478 Solvers