%% Faster Calculations of the Complete Elliptic Integrals by Changing the Tolerance
% The default value of tol is eps. Find the runtime with the default value for arbitrary M using tic and toc. Increase tol by a factor of thousand and find the runtime. Compare the runtimes.

tic
ellipke(0.904561)
toc
tic
ellipke(0.904561,eps*1000)
toc

% ellipke runs significantly faster when tolerance is significantly increased.
% Copyright 2015 The MathWorks, Inc.