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)<1e-5)
result =
[]
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test2 (line 2)
assert(abs(fifth_root(n)-1/25)<1e-5)
|
3
|
Fail
|
n = 1/5555;
assert(abs(fifth_root(n)-0.178263811215444)<1e-5)
result =
[]
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test3 (line 2)
assert(abs(fifth_root(n)-0.178263811215444)<1e-5)
|
4
|
Fail
|
n = 1/3125;
assert(abs(fifth_root(n)-1/5)<1e-5)
result =
[]
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test4 (line 2)
assert(abs(fifth_root(n)-1/5)<1e-5)
|
5
|
Fail
|
n = 1/125;
assert(abs(fifth_root(n)-0.380730787743176)<1e-5)
result =
[]
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test5 (line 2)
assert(abs(fifth_root(n)-0.380730787743176)<1e-5)
|
6
|
Fail
|
n = 1/5;
assert(abs(fifth_root(n)-0.724779663677696)<1e-5)
result =
[]
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test6 (line 2)
assert(abs(fifth_root(n)-0.724779663677696)<1e-5)
|
7
|
Fail
|
n = 1;
assert(abs(fifth_root(n)-1)<1e-5)
1
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test7 (line 2)
assert(abs(fifth_root(n)-1)<1e-5)
|
8
|
Fail
|
n = 5;
assert(abs(fifth_root(n)-1.37972966146121)<1e-5)
result =
1.379700000000000
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test8 (line 2)
assert(abs(fifth_root(n)-1.37972966146121)<1e-5)
|
9
|
Fail
|
n = 25;
assert(abs(fifth_root(n)-1.90365393871588)<1e-5)
result =
1.903700000000000
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test9 (line 2)
assert(abs(fifth_root(n)-1.90365393871588)<1e-5)
|
10
|
Fail
|
n = 50;
assert(abs(fifth_root(n)-2.18672414788656)<1e-5)
result =
2.186700000000000
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test10 (line 2)
assert(abs(fifth_root(n)-2.18672414788656)<1e-5)
|
11
|
Fail
|
n = 500;
assert(abs(fifth_root(n)-3.46572421577573)<1e-5)
result =
3.465700000000000
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test11 (line 2)
assert(abs(fifth_root(n)-3.46572421577573)<1e-5)
|
12
|
Fail
|
n = 3125;
assert(abs(fifth_root(n)-5)<1e-5)
5
Output argument "f" (and maybe others) not assigned during call to "fifth_root".
Error in Test12 (line 2)
assert(abs(fifth_root(n)-5)<1e-5)
|
13
|
Fail
|
n = 759375;
assert(abs(fifth_root(n)-15)<1e-5)
Requested 7593740001x1 (56.6GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test13 (line 2)
assert(abs(fifth_root(n)-15)<1e-5)
|
14
|
Fail
|
n = 9765625;
assert(abs(fifth_root(n)-25)<1e-5)
Requested 97656240001x1 (727.6GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test14 (line 2)
assert(abs(fifth_root(n)-25)<1e-5)
|
15
|
Fail
|
n = 312500000;
assert(abs(fifth_root(n)-50)<1e-5)
Requested 3124999990001x1 (23283.1GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test15 (line 2)
assert(abs(fifth_root(n)-50)<1e-5)
|
16
|
Fail
|
n = 75937500000;
assert(abs(fifth_root(n)-150)<1e-5)
Maximum variable size allowed by the program is exceeded.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test16 (line 2)
assert(abs(fifth_root(n)-150)<1e-5)
|
17
|
Fail
|
n = 31250000000000;
assert(abs(fifth_root(n)-500)<1e-5)
Maximum variable size allowed by the program is exceeded.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test17 (line 2)
assert(abs(fifth_root(n)-500)<1e-5)
|
18
|
Fail
|
n = 52658067346875;
assert(abs(fifth_root(n)-555)<1e-5)
Maximum variable size allowed by the program is exceeded.
Error in fifth_root (line 3)
list_num = (1:.0001:n);
Error in Test18 (line 2)
assert(abs(fifth_root(n)-555)<1e-5)
|