# [Scilab-users] Strange behavior of explicit vs implicit iteration

```
Dear All,```
```
Here I have the following script, where I compute the same thing using
two iteration methods:

alfa  =  rand(1,10);
Rpr  =  rand();
R  =  rand();
Z  =  rand(10,200);

G  =  zeros(1,200);
for  i=1:200
A  =  0;
B  =  0;
for  k  =  1:10
A  =  A  +  Rpr*alfa(k)  /  (Z(k,i)  +  alfa(k)*(1  -  alfa(k))*R);
B  =  B  +  Rpr*(1  -  alfa(k))  /  (Z(k,i)  +  alfa(k)*(1  -
alfa(k))*R);
end
G(i)  =  (1  +  A)  /  (1  +  B);
end

A  =  1;
B  =  1;
for  k  =  1:10
```
A = A + Rpr*alfa(k) ./ (Z(k,:) + alfa(k)*(1 - alfa(k))*R); B = B + Rpr*(1 - alfa(k)) ./ (Z(k,:) + alfa(k)*(1 - alfa(k))*R);
```end
G1  =  A  ./  B;

[M,  ind]  =  max(abs(G- G1))

However, the last line shows that there are differences between both
methods. They are tiny (near %eps), but I can't find nor imagine which
is the reason.

NOTE: I kept the original formulas as in the script where the problem
arised but changed the data. When I tried to use a simpler formula there
was no difference.

Any idea?

Regards,

Federico Miyara

--
El software de antivirus Avast ha analizado este correo electrónico en busca de
virus.
https://www.avast.com/antivirus
```
```_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users
```