Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

compound

Calculates compound interest.

Formula: principal × (1 + rate/n)^(n×t)

Arguments

  • principal - Initial amount
  • rate - Annual interest rate
  • n - Compounding frequency per period
  • t - Number of periods

Fully qualified path: cairo_fp::f64::math::interest::compound

fn compound(principal: Fixed, rate: Fixed, n: Fixed, t: Fixed) -> Fixed