- for(int i = 1; i < rank->size(); i++)
- sum += pow(-1, (double)(i+1)) * pow(((double)m / (double)(rank->size()-1)), i) * (double)(rank->get(i));
-
+ for(int i = 1; i < rank->size(); i++){
+ sum += pow(-1., i+1) * pow(((double)f / n), i) * (double)(rank->get(i));
+ }