compound
Calculates compound interest with specified frequency.
Formula: principal × (1 + rate/n)^(n×t)
Arguments
principal- Initial amountrate- Annual interest rate (e.g., 0.1 for 10%)n- Compounding frequency per period (e.g., 12 for monthly)t- Number of periods (e.g., years)
Fully qualified path: cairo_fp::f128::math::interest::compound
fn compound(principal: Fixed, rate: Fixed, n: Fixed, t: Fixed) -> Fixed