Cody

# Problem 2581. Sum of series VII

Solution 1803616

Submitted on 2 May 2019 by Margaret Hoeller
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))

numerator = 1 denom = 2

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

numerator = 2 denom = 6

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

numerator = 3 18 81 denom = 24 120 720

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

numerator = 2 8 24 64 denom = 6 24 120 720

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

numerator = 5 50 375 2500 15625 93750 546875 denom = 720 5040 40320 362880 3628800 39916800 479001600

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

numerator = 7 98 1029 9604 84035 denom = 40320 362880 3628800 39916800 479001600

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

numerator = 3 18 81 324 1215 4374 15309 52488 177147 590490 denom = 1.0e+09 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0004 0.0036 0.0399 0.4790 6.2270

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

numerator = 1.0e+09 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0005 0.0024 0.0105 0.0461 0.2013 0.8724 3.7581 denom = 1.0e+15 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0001 0.0013 0.0209 0.3557 6.4024

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

numerator = 1.0e+16 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0003 0.0038 0.0449 0.5316 6.2659 denom = 1.0e+26 * 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0003 0.0062 0.1551 4.0329