protected static Ptg calcLog( Ptg[] operands ) throws CalculationException
	{
		if( operands.length < 1 )
		{
			return PtgCalculator.getNAError();
		}
		double[] dd = PtgCalculator.getDoubleValueArray( operands );
		if( dd == null )
		{
			return new PtgErr( PtgErr.ERROR_NA );//20090130 KSC: propagate error
		}
		if( dd.length > 2 )
		{
			return PtgCalculator.getError();
		}
		double num1;
		double num2;
		if( dd.length == 1 )
		{
			num1 = dd[0];
			num2 = 10;
		}
		else
		{
			num1 = dd[0];
			num2 = dd[1];
		}
		double res = Math.log( num1 ) / Math.log( num2 );
		PtgNumber ptnum = new PtgNumber( res );
		return ptnum;
	}