Function financial::fv

source ·
pub fn fv(
    rate: f64,
    nper: f64,
    pmt: Option<f64>,
    pv: Option<f64>,
    pmt_at_begining: Option<bool>
) -> f64
Expand description

Calculates the future value of an investment based on a constant interest rate. You can use FV with either periodic, constant payments, or a single lump sum payment.

Examples

let fv = financial::fv(0.1, 5.0, Some(100.0), Some(1000.0), Some(false));
assert_eq!(fv, -2221.020000000001);