Message ID | 570BDB5C.3000608@arm.com |
---|---|
State | New |
Headers | show |
diff --git a/pelt.c b/pelt.c index b36194e8bb9c..3c6b42e88c2d 100644 --- a/pelt.c +++ b/pelt.c @@ -39,8 +39,8 @@ void calc_yn_sum(int n) printf("sum y^n\n"); printf(" %8s %8s %8s\n", "exact", "floor", "error"); for (i = 1; i <= n; i++) { - sum = (y * sum + y * 1024); - sum_fl = floor(y * sum_fl+ y * 1024); + sum = (y * sum + 1024); + sum_fl = floor(y * sum_fl + 1024); printf("%2d: %8.0f %8.0f %8.0f\n", i, sum, sum_fl, sum_fl - sum); }