refactor: Payment component calculation will target next true state

- Compute the next "true" state, round the values off, then compute the
  deltas needed to get the current state to that state. Plus some data
  integrity checks.
- Add `Number::zero`, which is longer to type, but more readable than
  `Number{}`.
- Prepare to improve Loan unit tests: track managementFeeRate in
  BrokerInfo, define a LoanParameters object for creation options and
  start adding support for it, track and verify loan state while making
  payments.
This commit is contained in:
Ed Hennis
2025-10-28 14:49:15 -04:00
parent f4404eafbd
commit 310852ba2d
6 changed files with 437 additions and 54 deletions

View File

@@ -58,6 +58,8 @@ public:
explicit Number(rep mantissa, int exponent);
explicit constexpr Number(rep mantissa, int exponent, unchecked) noexcept;
static Number const zero;
constexpr rep
mantissa() const noexcept;
constexpr int