clear %Clears everything clc %Clears the screen x = 2; %x == 2 stop = 10^(-15); % stop == 0.0000000000000001 while( x > stop) %While x is of greater value than stop x = x / 2; %Divide x by two. %So in the first pass x == 1 % in the second pass x == 1/2 %... and it goes on %... an on %as long as x is greater than stop... %If you do not program your stuff correctly... %It may never stop ! end x