So we have a fixed point function and were asked to choose an epsilon ( tolerance) that would give us an approximation of the root with 8 significant numbers.
The root is 1 so we would like a result that gives us 1,234567 ( 8 significant numbers)
My question is how am i supposed to guess that ? I know we have the formula :
$\Delta x\leq 0.5\quad X \quad 10^-m $ (exponent -m) But i am not sure what plays the role of $\Delta x$ here i think it's $errel$ but i am not sure.
Also when i check the output in the console it's always an answer with 5 significant numbers no matter what i change the epsilon to so i am a bit confused.
Thanks for your help.
The function
function [x] = pointfixe(g, x0, N, epsilon)
x(1)=x0;
x1=g(x0);
e_n=abs(x1-x0);
errel=e_n/abs(x1);
nbiterations=1;
while (errel > epsilon) & (nbiterations <N)
x0=x1;
x1=g(x0);
e_n_1=e_n;
e_n=abs(x1-x0);
errel=e_n/abs(x1);
nbiterations=nbiterations+1;
x(nbiterations)=x1;
disp(x);
end
end
My script
clear;close all;clc;
g1 = @(x) -0.25* (x^3 - 3*x^2 - 2);
x0 = 1.5;
epsilon = 1e-7;
N=50;
pointfixe(g1, x0, N, epsilon);
A part of the console imput to show you an example about what i mean by 5 significant numbers
Edit from this output how can i analyze if the number of significant numbers is 8, how can i judge which epsilon will give me 8 significant numbers
New edit


