Cody

# Problem 2581. Sum of series VII

Solution 1817543

Submitted on 16 May 2019 by H00 Bryan Daniels
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
n = 1; m = 1; s_correct = 1/2; assert(isequal(sumOfSeriesVII(n,m),s_correct))

A = 0.5000

2   Pass
n = 1; m = 2; s_correct = 1/3; assert(abs(sumOfSeriesVII(n,m)-s_correct)<eps)

A = 0.3333

3   Pass
n = 3; m = 3; s_correct = 0.3875; assert(abs(sumOfSeriesVII(n,m)-s_correct)<eps)

A = 0.1250 A = 0.1250 0.1500 A = 0.1250 0.1500 0.1125

4   Pass
n = 4; m = 2; s_correct = 0.955555555555556; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 0.3333 A = 0.3333 0.3333 A = 0.3333 0.3333 0.2000 A = 0.3333 0.3333 0.2000 0.0889

5   Pass
n = 7; m = 5; s_correct = 0.0408511683468281; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 0.0069 A = 0.0069 0.0099 A = 0.0069 0.0099 0.0093 A = 0.0069 0.0099 0.0093 0.0069 A = 0.0069 0.0099 0.0093 0.0069 0.0043 A = 0.0069 0.0099 0.0093 0.0069 0.0043 0.0023 A = 0.0069 0.0099 0.0093 0.0069 0.0043 0.0023 0.0011

6   Pass
n = 5; m = 7; s_correct = 0.00114327593060232; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 1.7361e-04 A = 1.0e-03 * 0.1736 0.2701 A = 1.0e-03 * 0.1736 0.2701 0.2836 A = 1.0e-03 * 0.1736 0.2701 0.2836 0.2406 A = 1.0e-03 * 0.1736 0.2701 0.2836 0.2406 0.1754

7   Pass
n = 10; m = 3; s_correct = 0.499971551885614; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 0.1250 A = 0.1250 0.1500 A = 0.1250 0.1500 0.1125 A = 0.1250 0.1500 0.1125 0.0643 A = 0.1250 0.1500 0.1125 0.0643 0.0301 A = 0.1250 0.1500 0.1125 0.0643 0.0301 0.0121 A = 0.1250 0.1500 0.1125 0.0643 0.0301 0.0121 0.0042 A = 0.1250 0.1500 0.1125 0.0643 0.0301 0.0121 0.0042 0.0013 A = 0.1250 0.1500 0.1125 0.0643 0.0301 0.0121 0.0042 0.0013 0.0004 A = 0.1250 0.1500 0.1125 0.0643 0.0301 0.0121 0.0042 0.0013 0.0004 0.0001

8   Pass
n = 14; m = 4; s_correct = 0.166666498956709; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 0.0333 A = 0.0333 0.0444 A = 0.0333 0.0444 0.0381 A = 0.0333 0.0444 0.0381 0.0254 A = 0.0333 0.0444 0.0381 0.0254 0.0141 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 0.0001 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 0.0001 0.0000 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 0.0001 0.0000 0.0000 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 0.0001 0.0000 0.0000 0.0000 A = 0.0333 0.0444 0.0381 0.0254 0.0141 0.0068 0.0029 0.0011 0.0004 0.0001 0.0000 0.0000 0.0000 0.0000

9   Pass
n = 15; m = 11; s_correct = 2.75459255461393e-07; assert(abs(sumOfSeriesVII(n,m)-s_correct)<10*eps)

A = 2.2964e-08 A = 1.0e-07 * 0.2296 0.3886 A = 1.0e-07 * 0.2296 0.3886 0.4580 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 0.0279 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 0.0279 0.0146 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 0.0279 0.0146 0.0072 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 0.0279 0.0146 0.0072 0.0034 A = 1.0e-07 * 0.2296 0.3886 0.4580 0.4478 0.3849 0.2988 0.2131 0.1410 0.0872 0.0508 0.0279 0.0146 0.0072 0.0034 0.0016