protected static Ptg calcYieldDisc( Ptg[] operands )
	{
		if( operands.length < 4 )
		{
			PtgErr perr = new PtgErr( PtgErr.ERROR_NULL );
			return perr;
		}
			debugOperands( operands, "calcYIELDDISC" );
		try
		{
			GregorianCalendar sDate = (GregorianCalendar) DateConverter.getCalendarFromNumber( operands[0].getValue() );
			GregorianCalendar mDate = (GregorianCalendar) DateConverter.getCalendarFromNumber( operands[1].getValue() );
			double pr = operands[2].getDoubleVal();
			double redemption = operands[3].getDoubleVal();
			int basis = 0;
			if( operands.length > 4 )
			{
				basis = operands[4].getIntVal();
			}

			long settlementDate = (new Double( DateConverter.getXLSDateVal( sDate ) )).longValue();
			long maturityDate = (new Double( DateConverter.getXLSDateVal( mDate ) )).longValue();

			if( (pr <= 0) || (redemption <= 0) )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}
			if( (basis < 0) || (basis > 4) )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}
			if( maturityDate <= settlementDate )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}

//		double DSM = maturityDate - settlementDate;
//		double B = getDaysInYearFromBasis(basis, settlementDate, maturityDate);
//		double result = ((redemption - pr) / pr) * (B / DSM);
			double result = ((redemption - pr) / pr) / yearFrac( basis, settlementDate, maturityDate );
				log.debug( "Result from calcYIELDDISC= " + result );
			PtgNumber pnum = new PtgNumber( result );
			return pnum;
		}
		catch( Exception e )
		{
		}
		return new PtgErr( PtgErr.ERROR_VALUE );
	}