WUT_Computer_Science/ENUME/references/ENUME_ProjectA_No31/task 1/macheps.m
2021-11-10 13:12:25 +01:00

8 lines
193 B
Matlab

function [macheps] = macheps()
%MACHEPS function calculates machine epsilon
% finds smallest number E that 1+E>1
macheps = 1;
while( 1 + ( macheps / 2 ) > 1 )
macheps = macheps/2;
end
end