mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 20:43:11 +02:00
8 lines
193 B
Mathematica
8 lines
193 B
Mathematica
|
|
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
|