protected static Ptg calcSmall( Ptg[] operands ) throws CalculationException
	{
		if( operands.length != 2 )
		{
			return new PtgErr( PtgErr.ERROR_VALUE );
		}
		Ptg rng = operands[0];
		Ptg[] array = PtgCalculator.getAllComponents( rng );
		if( array.length == 0 )
		{
			return new PtgErr( PtgErr.ERROR_NUM );
		}
		int k = new Double( PtgCalculator.getDoubleValueArray( operands[1] )[0] ).intValue();
		if( (k <= 0) || (k > array.length) )
		{
			return new PtgErr( PtgErr.ERROR_NUM );
		}

		CompatibleVector sortedValues = new CompatibleVector();
		for( Ptg p : array )
		{
			try
			{
				Double d = new Double( String.valueOf( p.getValue() ) );
				sortedValues.addOrderedDouble( d );
			}
			catch( NumberFormatException e )
			{
			}
			;
		}
		try
		{
			return new PtgNumber( (Double) sortedValues.get( k - 1 ) );
		}
		catch( Exception e )
		{
			return new PtgErr( PtgErr.ERROR_VALUE );
		}
	}