#define M 10 struct S { float x; float y; } pS[100]; void foo (int n, float *ub, float *uc) { int i, j; float tmp1, tmp2; float sumx, sumy; for (i = 0; i < n; i++) { pS[i].x = 0; pS[i].y = 0; tmp1 = ub[i]; tmp2 = uc[i]; for (j = 0; j < M; j++) { float tmp = (float) j; float c2 = (float) tmp * tmp; float c4 = (float) 4.0 + tmp; float c5 = (float) c4 / tmp; sumx = ((float) tmp1 * c5 + (float)((float) (tmp2 * 10.0) * c2)); sumy = ((float) tmp2 * c2 + (float)((float) (tmp1 * 6.0) * c5)); pS[i].x += sumx; pS[i].y += sumy; } } }