protected static Ptg calcPmt( Ptg[] operands )
	{
		if( operands.length < 3 )
		{ // not
			// supported
			// by
			// function
			PtgErr perr = new PtgErr( PtgErr.ERROR_NULL );
			return perr;
		}
		double rate;
		double nper;
		double pv;
		double fv;
		double type;
		rate = new Double( String.valueOf( operands[0].getValue() ) );
		nper = new Double( String.valueOf( operands[1].getValue() ) );
		pv = new Double( String.valueOf( operands[2].getValue() ) );
		if( operands.length > 3 )
		{
			if( operands[3] instanceof PtgMissArg )
			{
				fv = 0;
			}
			else
			{
				fv = new Double( String.valueOf( operands[3].getValue() ) );
			}
		}
		else
		{
			fv = 0;
		}
		if( operands.length > 4 )
		{
			if( operands[4] instanceof PtgMissArg )
			{
				type = 0;
			}
			else
			{
				type = new Double( String.valueOf( operands[4].getValue() ) );
			}
		}
		else
		{
			type = 0;
		}

		//KSC: For some strange odd weird reason, original calculation was off
		// even though this should be exactly the same thing. Go figure!
		double Rn = Math.pow( 1 + rate, nper );
		double A = (-fv * rate) - (pv * Rn * rate);
		double B = (Rn - 1) * (1 + (rate * type));
		double result = A / B;
		PtgNumber pnum = new PtgNumber( result );
		return pnum;
	}