protected static Ptg calcMaxA( Ptg[] operands )
	{
		Ptg[] alloperands = PtgCalculator.getAllComponents( operands );
		if( alloperands.length == 0 )
		{
			return new PtgNumber( 0 );
		}
		double max = Double.MIN_VALUE;
		for( Ptg alloperand : alloperands )
		{
			Object o = alloperand.getValue();
			try
			{
				double d = Double.MIN_VALUE;
				if( o instanceof Number )
				{
					d = ((Number) o).doubleValue();
				}
				else if( o instanceof Boolean )
				{
					d = ((Boolean) o ? 1 : 0);
				}
				else
				{
					d = new Double( o.toString() );
				}
				max = Math.max( max, d );
			}
			catch( NumberFormatException e )
			{
				// Arguments that are error values or text that cannot be translated into numbers cause errors. 
				return new PtgErr( PtgErr.ERROR_VALUE );
			}
			;
		}
		return new PtgNumber( max );
	}