START
Float p[100], error, s , a, b, c,
e, fxn, faksenxn;
Int i=1;
Masukkan persamaan f(x)
dengan format Ax^e + Bx+ C
A=1; B=-1; C=2; e=3; p[i]=-1,5;
fxn=((a)*pow(p[i],e))+(((b*p[i])+c));
faksenxn=((3*a*pow(p[i],(e-1)))+b);
p[i+1]=p[i]-(fxn/faksenxn);
s=p[i]-p[i+1];
error=((a)*pow(p[i+1],e))+(((b*p[i+1])+c));
i, i+1, selisih error
i++;
FALSE
Error>0.0000001 ||
error<-0.0000001
TRUE
END