Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

effective_annual_rate

Calculates the effective annual rate (EAR) from a nominal rate.

Formula: (1 + r/n)^n - 1

Arguments

  • nominal_rate - The stated annual rate
  • compounds_per_year - Number of compounding periods per year

Fully qualified path: cairo_fp::f128::math::interest::effective_annual_rate

fn effective_annual_rate(nominal_rate: Fixed, compounds_per_year: Fixed) -> Fixed