User blog:Nayuta Ito/PEGG detailed log

On May 8th, PEGG is 1 by definition.

The variables are X=0.00, Y="E", Z=0.01, K=1000. (by definition)

On May 9th, since the May 8th DJIA ends with 21012.28, so n=8.

Next, X+n^2*Z=0.64, so X becomes 0.64.

Next, int(E0.64)=int(10^0.64)=4, so PEGG becomes 4.

Since X<=10, nothing else happens on this day.

Variables: X=0.64, Y="E", Z=0.01, K=1000

On May 10th, since the May 9th DJIA ends with 20975.78, so n=8.

Next, X+n^2*Z=1.28, so X becomes 1.28.

Next, int(E1.28)=int(10^1.28)=19, so PEGG becomes 19.

Since X<=10, nothing else happens on this day.

Variables: X=1.28, Y="E", Z=0.01, K=1000

On May 11th, since the May 10th DJIA ends with 20943.11, so n=1.

Next, X+n^2*Z=1.29, so X becomes 1.29.

Next, int(E1.29)=int(10^1.29)=19, so PEGG is still 19.

Since X<=10, nothing else happens on this day.

Variables: X=1.29, Y="E", Z=0.01, K=1000

On May 12th, since the May 11th DJIA ends with 20919.42, so n=2.

Next, X+n^2*Z=1.33, so X becomes 1.33.

Next, int(E1.33)=int(10^1.33)=21, so PEGG becomes 21.

Since X<=10, nothing else happens on this day.

Variables: X=1.33, Y="E", Z=0.01, K=1000