clear all ;clc;
format long ;
for i =10:10:1e+2
   
x= 1/i ;
   
% loss of significance demonstrated for increasing values
% of x there are fewer digits of accuracy in the computed
% value of f(x).
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%')
disp(x)
disp('The original and manipulated evaluations  : ');
disp( (1 - cos(x))/ (x*x)); 
%disp('The manipulated evaluation is: ');
disp( 1/2  - x*x/factorial(4) + x*x*x*x/factorial(6));
% disp('Loss of Significance: ');
%  diff_1 = x*( - sqrt(x) + sqrt(x+1));
%   diff_2 = x/(sqrt(x) + sqrt(x+1));
%disp(abs(diff_1 - diff_2));
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%')
end