Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down' into ximinez/number-round-maxrep

* XRPLF/ximinez/number-round-maxrep-down:
  Fix formatting, add an assert
This commit is contained in:
Ed Hennis
2026-06-06 16:02:59 -04:00

View File

@@ -528,6 +528,9 @@ Number::Guard::doRoundDown(bool& negative, T& mantissa, int& exponent)
{
// If there was any remainder, subtract 1 from the result. This is sufficient to get the
// best rounding.
XRPL_ASSERT(
empty() || mantissa > maxMantissa_,
"xrpl::Number::Guard::doRoundDown : mantissa is expected size");
if (r != Round::Exact)
{
--mantissa;