public static int Compare(NaturalNumber n, NaturalNumber m)
	{
		int i, comparison;
		
		if(n.size != m.size)
		{
			/* the longer one is not necessarily the greater, if the 
			   difference is all leading zeroes -- scan the excess: if there
			   is a nonzero digit, then the longer one is the greater, else
			   proceed as if they were of equal length. */
			NaturalNumber longer = null, shorter = null;
			
			if(n.size > m.size)
			{
				comparison = 1;
				longer = n;
				shorter = m;
			}
			else
			{
				comparison = -1;
				longer = m;
				shorter = n;
			}
			
			for(i = longer.size - 1; i >= shorter.size; i--)
			{
				if(longer.digits[i] > 0)
				{
					return comparison;
				}
			}
		}
		else
		{
			i = n.size - 1;
		}
		
		/* starting from the most significant position, see if any digits are
		   unequal: if so, then the one with the greater digit is the greater
		   number; if not, then they are equal. */
		while(i >= 0)
		{
			if(n.digits[i] > m.digits[i])
			{
				return 1;
			}
			if(n.digits[i] < m.digits[i])
			{
				return -1;
			}
			
			i--;
		}
		
		return 0;
	}