I assume you want to collect the values of `c` in cList? Just replace your loop with cList=First@Last@Reap@While[Abs[b-a]/2>ϵ, c=(a+b)/2; iter=iter+1;(*number of iterations*) Sow[c]; If[f[a]*f[c]<0,b=c,a=c] ]; ![Mathematica graphics](https://i.sstatic.net/3MaBp.png) Lookup help on `Sow` and `Reap` Btw, `iter=iter+1` can be written as `iter++` in Mathematica.