Cody

Problem 47078. Sum of infinite series.

Solution 3371108

Submitted on 25 Oct 2020 by kaatil_coder
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
x = 1; n = -1; y_correct = 0.5; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 0.5000

2   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 0.2500

3   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 0.2500

4   Pass
x = 0; n = -3; y_correct = 1; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 1

5   Pass
x = 3; n = -1; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 0.2500

6   Pass
x = 1; n = -2; y_correct = 0.25; assert(abs(binomial(x,n)-y_correct)<1e-5)

S = 0.2500

Suggested Problems

More from this Author5

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!