Cody

Solution 1757954

Submitted on 22 Mar 2019
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   Pass
foo=@cosh; goo=@(x)sqrt(cosh(x)+pi); winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==1))

z = 0.0011 0.0015 z = 1.0e-03 * 0.3190 0.4790 z = 1.0e-03 * 0.3160 0.4760 z = 1.0e-03 * 0.3210 0.5110 z = 0.0008 0.0016 z = 1.0e-03 * 0.2950 0.4420 z = 1.0e-03 * 0.2900 0.4290 z = 1.0e-03 * 0.2900 0.4110 z = 1.0e-03 * 0.2910 0.4410 z = 1.0e-03 * 0.2920 0.4130

2   Pass
foo=@num2str; goo=@log10; winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==2))

z = 0.0224 0.0094 z = 0.0169 0.0004 z = 0.0157 0.0004 z = 0.0164 0.0004 z = 0.0176 0.0006 z = 0.0156 0.0003 z = 0.0158 0.0003 z = 0.0155 0.0004 z = 0.0157 0.0003 z = 0.0155 0.0003

3   Fail
foo=@gamma; goo=@sign; winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==1))

z = 0.0221 0.0005 z = 1.0e-03 * 0.3800 0.0330 z = 1.0e-03 * 0.4760 0.0380 z = 1.0e-03 * 0.3790 0.0320 z = 1.0e-03 * 0.5120 0.1900 z = 1.0e-03 * 0.3710 0.0280 z = 1.0e-03 * 0.3630 0.0250 z = 1.0e-03 * 0.3620 0.0260 z = 1.0e-03 * 0.3630 0.0610 z = 1.0e-03 * 0.3630 0.0260

Assertion failed.