-/* Reduce the problem to one where amount <= trace_total */
- quotient = (int) (floor(amount / total_));
- reduced_amount = (total_) * ((amount / total_) -
- floor(amount / total_));
- reduced_a = a - (lastTime_) * (int) (floor(a / lastTime_));
-
- XBT_DEBUG("Quotient: %d reduced_amount: %f reduced_a: %f", quotient,
- reduced_amount, reduced_a);
-
-/* Now solve for new_amount which is <= trace_total */
-/*
- fprintf(stderr,"reduced_a = %.2f\n",reduced_a);
- fprintf(stderr,"reduced_amount = %.2f\n",reduced_amount);
- */
- reduced_b = solveSomewhatSimple(reduced_a, reduced_amount);
+ /* Reduce the problem to one where amount <= trace_total */
+ int quotient = static_cast<int>(floor(amount / total_));
+ double reduced_amount = (total_) * ((amount / total_) - floor(amount / total_));
+ double reduced_a = a - (last_time_) * static_cast<int>(floor(a / last_time_));