Cody

# Problem 42826. Euler–Mascheroni constant

Solution 2243332

Submitted on 29 Apr 2020 by Simone Corti
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);

ans = 0.3069

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

ans = 0.4014

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

ans = 0.4470

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

ans = 0.5311

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

ans = 0.5723

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

ans = 0.5767