Problem 45960. Set the Euler-Mascheroni constant with an identity using available MATLAB functions

Solution 3876243

Submitted on 27 Nov 2020 by Binbin Qi
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
y_correct = 0.5772156649; assert(isequal(EulerMascheroni,y_correct))

gamma = 0.5772

2   Pass
filetext = fileread('EulerMascheroni.m'); summing = ~isempty(strfind(filetext, 'sum')) || ~isempty(strfind(filetext, 'plus')) ||... ~isempty(strfind(filetext, '+')); assert(~summing, 'Please do not sum infinite series')

3   Pass
filetext = fileread('EulerMascheroni.m'); assert(isempty(strfind(filetext, '5772156649')), 'Please do not set the constant directly (or indirectly with arithmetic')

Suggested Problems

More from this Author67

Community Treasure Hunt

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

Start Hunting!