This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x=[ 1.000000000000 2.000000000000 3.000000000000 4.000000000000 5.000000000000 6.000000000000 7.000000000000 8.000000000000 9.000000000000 10.000000000000 ];
y=sol(x);
yref=-5.000000000000
assert(abs(y-yref)<1e-6);
ans =
-1 -1 -1 -1 -1
yref =
-5
|
2 | Fail |
x=[ 2.000000000000 4.000000000000 8.000000000000 16.000000000000 32.000000000000 64.000000000000 128.000000000000 256.000000000000 512.000000000000 1024.000000000000 ];
y=sol(x);
yref=-682.000000000000
assert(abs(y-yref)<1e-6);
ans =
-2 -8 -32 -128 -512
yref =
-682
|
3 | Fail |
x=[ 1.000000000000 4.000000000000 9.000000000000 16.000000000000 25.000000000000 36.000000000000 49.000000000000 64.000000000000 81.000000000000 100.000000000000 ];
y=sol(x);
yref=-55.000000000000
assert(abs(y-yref)<1e-6);
ans =
-3 -7 -11 -15 -19
yref =
-55
|
4 | Fail |
x=[ 1.000000000000 8.000000000000 27.000000000000 64.000000000000 125.000000000000 216.000000000000 343.000000000000 512.000000000000 729.000000000000 1000.000000000000 ];
y=sol(x);
yref=-575.000000000000
assert(abs(y-yref)<1e-6);
ans =
-7 -37 -91 -169 -271
yref =
-575
|
5 | Fail |
x=[ 1.000000000000 0.500000000000 0.333333333333 0.250000000000 0.200000000000 0.166666666667 0.142857142857 0.125000000000 0.111111111111 0.100000000000 ];
y=sol(x);
yref=0.645634920635
assert(abs(y-yref)<1e-6);
ans =
0.5000 0.0833 0.0333 0.0179 0.0111
yref =
0.6456
|
6 | Fail |
x=[ 0.243132468125 -0.107772980466 0.155477890178 -0.328813312188 0.206046088020 -0.468167153623 -0.223077015039 -0.453828609369 -0.402868218764 0.323457828327 ];
y=sol(x);
yref=1.013835439837
assert(abs(y-yref)<1e-6);
ans =
0.3509 0.4843 0.6742 0.2308 -0.7263
yref =
1.0138
|
927 Solvers
213 Solvers
276 Solvers
83 Solvers
Convert from integer to binary
51 Solvers