protected static Ptg calcDISC( Ptg[] operands )
	{
		if( operands.length < 4 )
		{
			return new PtgErr( PtgErr.ERROR_NULL );
		}
			debugOperands( operands, "calcDISC" );
		try
		{
			GregorianCalendar sDate = (GregorianCalendar) DateConverter.getCalendarFromNumber( operands[0].getValue() );
			GregorianCalendar mDate = (GregorianCalendar) DateConverter.getCalendarFromNumber( operands[1].getValue() );
			long settlementDate = (new Double( DateConverter.getXLSDateVal( sDate ) )).longValue();
			long maturityDate = (new Double( DateConverter.getXLSDateVal( mDate ) )).longValue();
			double pr = operands[2].getDoubleVal();
			double redemption = operands[3].getDoubleVal();
			int basis = 0;
			if( operands.length > 4 )
			{
				basis = operands[4].getIntVal();
			}
			//		 TODO: if dates are not valid, return #VALUE! error
			if( (basis < 0) || (basis > 4) )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}
			if( settlementDate > maturityDate )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}
			if( (pr <= 0) || (redemption <= 0) )
			{
				return new PtgErr( PtgErr.ERROR_NUM );
			}

//		double DSM = maturityDate - settlementDate;
//		double B = getDaysInYearFromBasis(basis, settlementDate, maturityDate);
//		double result = (redemption - pr) / redemption * (B / DSM);
			double result = (redemption - pr) / (redemption * yearFrac( basis, settlementDate, maturityDate ));

			PtgNumber pnum = new PtgNumber( result );
				log.debug( "Result from calcDISC= " + result );
			return pnum;
		}
		catch( Exception e )
		{
			log.warn( "Error in calcDISC", e );
		}
		return new PtgErr( PtgErr.ERROR_VALUE );
	}