Cody

# Problem 42826. Euler–Mascheroni constant

Solution 884266

Submitted on 30 Apr 2016 by George Papazafeiropoulos
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; gamma_n_correct = 0.3069; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

2   Pass
n = 2; gamma_n_correct = 0.4014; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

3   Pass
n = 3; gamma_n_correct = 0.4470; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

4   Pass
n = 10; gamma_n_correct = 0.5311; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

5   Pass
n = 100; gamma_n_correct = 0.5723; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

6   Pass
n = 1000; gamma_n_correct = 0.5767; assert(abs(euler_mascheroni_constant(n)-gamma_n_correct)<0.001);

### Community Treasure Hunt

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

Start Hunting!