static public double fv(double r, int nper, double pmt, double pv, int type) {return -(pv * Math.pow(1 + r, nper) + pmt * (1+r*type) * (Math.pow(1 + r, nper) - 1) / r);}
static public double FV(double r, int nper, double pmt, double pv, int type){double fv = -(pv * Math.Pow(1 + r, nper) + pmt * (1 + r * type) * (Math.Pow(1 + r, nper) - 1) / r);return fv;}