Problem 46081. Set Soldner's constant

Solution 2764000

Submitted on 31 Jul 2020 by Tim
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
mu_correct = 1.451369234883381; assert(abs(SoldnersConstant-mu_correct) < 1e-14)

2   Pass
filetext = fileread('SoldnersConstant.m'); assert(isempty(strfind(filetext,'45136923488')), 'Please do not set the constant directly') banfns = ~isempty(strfind(filetext, 'sum')) || ~isempty(strfind(filetext, 'plus')) ||... ~isempty(strfind(filetext, '+')) || ~isempty(strfind(filetext, 'minus')) || ... ~isempty(strfind(filetext, '-')) || ~isempty(strfind(filetext, 'diff')) || ... ~isempty(strfind(filetext, 'str2num')); assert(~banfns, 'Please do not set the constant indirectly with arithmetic')

Suggested Problems

More from this Author48

Community Treasure Hunt

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

Start Hunting!