Cody

Problem 42670. If you prick us, do we not bleed?

Solution 767204

Submitted on 26 Oct 2015 by Gareth Lee
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
%% L=3; T=3; y_correct = 0.63661977236758; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 2.3676e-09

2   Pass
%% L=4; T=1; y_correct = 0.92000006671399; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 3.4215e-09

3   Pass
%% L=20; T=12; y_correct = 0.80254106139093; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 2.9846e-09

4   Pass
%% L=12; T=20; y_correct = 0.38197186342055; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 1.4206e-09

5   Pass
%% L=1; T=4; y_correct = 0.1591549430919; b=abs(Belonephobia(L,T)-y_correct) assert(b<1e-7)

b = 5.9190e-10

6   Pass
%% L=2; T=ceil(rand*10); y_correct=[0.83724842055825 0.63661977236758 0.42441318157839 0.31830988618379 0.25464790894703 0.21220659078919 0.18189136353359 0.15915494309190 0.14147106052613 0.12732395447352]; b=abs(Belonephobia(L,T)-y_correct(T)) assert(b<1e-7)

b = 7.8919e-10

7   Pass
%% L=ceil(rand*10); T=2; y_correct=[0.31830988618379 0.63661977236758 0.77860806073666 0.83724842055825 0.87089052216005 0.89287978884975 0.90841991082367 0.92000006671399 0.92896896682647 0.93612322320525]; b=abs(Belonephobia(L,T)-y_correct(L)) assert(b<1e-7)

b = 3.4814e-09