Manipulate executes twice [closed]

I need help, guys! Here the script:

numberProcesses = 24;
numberLevels = 4;
Manipulate[
numberExperts = E;
processMatrix =
Table[RandomReal[{0, 1}, WorkingPrecision -> 2], {i, E}, {j,
numberLevels}];
aggregatedMark =
Table[Total[processMatrix[[All, k]]]/E, {k, numberLevels}];
deviation =
Table[N[Sqrt[
Sum[RootApproximant[(processMatrix[[h, g]] -
aggregatedMark[[g]])^2], {h, E}]/E], 2], {g, numberLevels}];
variation =
Table[N[RootApproximant[deviation[[g]]/aggregatedMark[[g]]*100],
2], {g, numberLevels}];
graphTable =
Table[Show[{Histogram[processMatrix[[All, j]], {0, 1, 0.1}, "PDF"],
SmoothHistogram[processMatrix[[All, j]],
PlotStyle -> Thick]}], {j, numberLevels}];
groupMark = {};
k = {};
l = {};
tmax = 2;
t = 1;
AppendTo[k, Table[1/E, {i, E}]];
While[True,
AppendTo[groupMark,
Table[N[Sum[processMatrix[[i, j]]*k[[t, i]], {i, E}], 2], {j,
numberLevels}]];
AppendTo[l,
RootApproximant[
Sum[Sum[groupMark[[t, i]]*processMatrix[[j, i]], {j, E}], {i,
numberLevels}]]];
temp = Table[
N[1/l[[t]]*
Sum[(processMatrix[[i, j]]*groupMark[[t, j]]), {j,
numberLevels}], 2], {i, E - 1}];
AppendTo[k,
AppendTo[temp,
N[RootApproximant[1 - Sum[temp[[i]], {i, E - 1}]], 2]]];
If[t >= tmax,
If[Max[Table[
Abs[groupMark[[t, i]] - groupMark[[t - 1, i]]], {i,
numberLevels}]] <= 0.0001, Break[], t++], t++]];
viewTable = Text[Grid[Append[Append[Append[Append[Append[
Prepend, {Prepend[
processMatrix, {"Второй уровень", "Третий уровень",
"Четвёртый уровень", "Пятый уровень"}],
Prepend[Table[i, {i, E}], ""]}],
Insert[aggregatedMark, "fi",1]],
Insert[deviation, "Sigma", 1]],
Insert[variation, "V", 1]],
Insert[graphTable, "Graph", 1]],
Insert[groupMark[[t, All]], "Mark", 1]], Frame -> All,
Background -> LightYellow]], {{E, 3, "Number"}, 2,
100, 1}, ContinuousAction -> False, TrackedSymbols -> {E}]


It does:

And most of that works well, but when the E value is changed Manipulate executes all twice... Why is it so? I really don't understand. I tried delete the graphs from the table. After that I saw Manipulate didn't execute all twice. It's magic =/

Secondly, I don't know how I can get real numbers with only two digits after the point (0.xx). When I use N[,2] Mathematica returns sometimes 0.0xx or 0.00xx. But I wanna get 0.0x or 0.00 (of course, using the standard rule for rounding). How can I do it?

And last but not least, as you can see I used such functions as RootApproximant. I don't want use it, but sometimes without 'em Mathematica says: No significant digits are available to display. What can I do?

I will be happy if someone will help me optimize the script. Thank you for your attention.

EDITED

Manipulate executes all twice. It was solved - Stackoverflow. Thanks, @SjoerdC.deVries.

-

closed as off-topic by m_goldberg, ciao, bobthechemist, belisarius, Yves KlettApr 21 '14 at 6:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – m_goldberg, ciao, bobthechemist, belisarius, Yves Klett
If this question can be reworded to fit the rules in the help center, please edit the question.

For your two-digit number output problem you might use Round[#., 0.01]& –  m_goldberg Apr 20 '14 at 14:15
–  Sjoerd C. de Vries Apr 20 '14 at 19:06
And an earlier one on stackoverflow: stackoverflow.com/questions/7283109/… –  Sjoerd C. de Vries Apr 20 '14 at 19:10
@SjoerdC.deVries, thx. It works! ^_^ –  Vitaliy Sergeyevich Barash Apr 20 '14 at 20:14

From my StackOverflow answer on a similar question of three years ago:

This can be solved by adding the option PerformanceGoal -> "Quality" to the Plot function.

During the display of manipulated items a lower fidelity sample of the object can be shown depending on the PerformanceGoal setting. A higher fidelity version is drawn at the end of the manipulation, if necessary. It is this later redrawing which seems to be causing the problem here.

-
Thanks you for your attention! :) It works well! –  Vitaliy Sergeyevich Barash Apr 20 '14 at 20:25
I figure a correct, accepted answer deserves at least one upvote, even on a duplicate, as sign that someone else agrees with it, per the SE model. (Just happened to run across it this morning. April is my busiest time of the year, in general) –  Michael E2 Feb 1 at 13:04
@MichaelE2 thanks, much tidier this way :) –  Sjoerd C. de Vries Feb 1 at 16:28

You know how people on this site are always talking about not using capital letters as symbols because it might cause problems? Well... E is the symbol for the exponential constant (2.718...). The first time through, the Manipulate evaluates everything as if E were Exp[1], then it goes through again and evaluates E as the variable in your Manipulate, i.e., {E, 3, "Number"}. So just change all the occurrences of E to e (or something else) and the multiple evaluation problem vanishes.

-
Thx, I done it, but Manipulate still executes all twice =/ –  Vitaliy Sergeyevich Barash Apr 20 '14 at 20:16
Only executes once on my machine. Given Sjoerd C. de Vries answer, maybe it's the speed of the machines. –  bill s Apr 20 '14 at 21:11