fix: Fix a rounding error at the Number::maxRep cusp

- Add helper function, doDropDigit, to wrap the common pattern:
    push(mantissa % 10);
    mantissa /= 10;
    ++exponent;
- Might have been helpful to catch this issue when developing.
This commit is contained in:
Ed Hennis
2026-04-28 22:28:14 -04:00
parent 8e2aa33f64
commit b40d2a8e7d
17 changed files with 570 additions and 345 deletions

View File

@@ -143,7 +143,7 @@ AMMTestBase::testAMM(std::function<void(jtx::AMM&, jtx::Env&)> const& cb, TestAM
// mantissas
Env env{
*this,
features - featureSingleAssetVault - featureLendingProtocol,
features - featureSingleAssetVault - featureLendingProtocol - fixCleanup3_2_0,
arg.noLog ? std::make_unique<CaptureLogs>(&logs) : nullptr};
auto const [asset1, asset2] = arg.pool ? *arg.pool : std::make_pair(XRP(10000), USD(10000));