- XBT_DEBUG("amount %f total %f", amount, m_total);
-/* Reduce the problem to one where amount <= trace_total */
- quotient = (int) (floor(amount / m_total));
- reduced_amount = (m_total) * ((amount / m_total) -
- floor(amount / m_total));
- reduced_a = a - (m_lastTime) * (int) (floor(a / m_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);
+ XBT_DEBUG("amount %f total %f", amount, total_);
+ /* 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_));