protected static Ptg calcFV( Ptg[] operands )
	{
		if( operands.length < 3 )
		{
			return new PtgErr( PtgErr.ERROR_NULL );
		}
			debugOperands( operands, "calcFV" );
		double rate = operands[0].getDoubleVal();
		int nper = operands[1].getIntVal();
		double pmt = operands[2].getDoubleVal();
		double pv = 0;
		int type = 0;
		if( (operands.length > 3) && !(operands[3] instanceof PtgMissArg) )
		{
			pv = operands[3].getDoubleVal();
		}
		if( operands.length > 4 )
		{
			type = operands[4].getIntVal();
		}

		double A = Math.pow( 1 + rate, nper );
		double B = pmt * (1 + (rate * type));
		B *= (Math.pow( 1 + rate, nper ) - 1) / rate;
		double result = -((pv * A) + B);
		PtgNumber pnum = new PtgNumber( result );
			log.debug( "Result from calcFV= " + result );
		return pnum;

	}