Some instrumentation output for how much the numerator or denominator is shifted.

This commit is contained in:
John Ralls 2017-04-07 12:39:47 -07:00
parent fd6234f58f
commit 2035806db7

View File

@ -215,6 +215,7 @@ GncRational::round_to_numeric() const
--ll_bits;
}
}
std::cout << "Rounded with " << ll_bits << " bits.\n";
return new_v;
}
auto quot(m_den / m_num);
@ -236,6 +237,7 @@ GncRational::round_to_numeric() const
continue;
}
GncRational new_rational(num, den);
std::cout << "Divisor converted with " << ll_bits << "bits.\n";
return new_rational;
}
new_v = convert<RoundType::half_down>(m_den / divisor);
@ -245,6 +247,7 @@ GncRational::round_to_numeric() const
new_v = GncRational();
}
}
std::cout << "Divisor rounded with " << ll_bits << "bits.\n";
return new_v;
}