Integer _IntMinus(const Integer &a, const Integer &b)
	{
		Integer exv;

		int maxlen = a.size;
		if (b.size > maxlen) maxlen = b.size;

		exv.assignSpace(maxlen);

		int t1, t2;

		for (int i = maxlen - 1; i >= 0; --i)
		{
			if (i >= a.size) t1 = 0; else t1 = a.num[i];
			if (i >= b.size) t2 = 0; else t2 = b.num[i];

			exv.num[i] = t1 - t2;
			int j = i;
			while (exv.num[j] < 0)
			{
				--exv.num[j + 1];
				exv.num[j] += 10000;
				++j;
			}
		}

		while (exv.size > 1 && exv.num[exv.size - 1] == 0) --exv.size;	//delete leading zero

		exv.nonnegative = true;

		//exv.exactness = a.exactness && b.exactness; 

		return exv;
	}
	Integer _IntPlus(const Integer &a, const Integer &b)
	{
		Integer exv;

		int maxlen = a.size; 
		if (b.size > maxlen) maxlen = b.size;	// the longest integer
		maxlen += 1;

		exv.nonnegative = true;

		exv.assignSpace(maxlen);

		int t1, t2;

		int temp;
		for (int i = 0; i < maxlen; ++i)
		{
			if (i >= a.size) t1 = 0; else t1 = a.num[i];
			if (i >= b.size) t2 = 0; else t2 = b.num[i];
			temp = exv.num[i] + t1 + t2;
			//if (exv.num[i] +)
			if (temp >= 10000) ++exv.num[i + 1], temp -= 10000;
			if (temp >= 10000) ++exv.num[i + 1], temp -= 10000;
			//exv.num[i + 1] += (exv.num[i] + t1 + t2) / 10000;		//isopsephy
			exv.num[i] = temp;			
		}

		while (exv.size > 1 && exv.num[exv.size - 1] == 0) --exv.size;	//delete leading zero

		if (exv.size == 1 && exv.num[0] == 0) exv.nonnegative = true;

		//exv.exactness = a.exactness && b.exactness; 

		return exv;
	}
	Integer IntMult(const Integer &a, const Integer &b)
	{
		int maxlen = a.size + b.size + 1;

		Integer exv;
		exv.assignSpace(maxlen);

		for (int i = 0; i < a.size; ++i)
			for (int j = 0; j < b.size; ++j)
			{
				exv.num[i + j] = exv.num[i + j] + a.num[i] * b.num[j];
				exv.num[i + j + 1] = (exv.num[i + j] / 10000 + exv.num[i + j + 1]);
				exv.num[i + j] = exv.num[i + j] % 10000;
			}

		exv.nonnegative = !(a.nonnegative ^ b.nonnegative);
		//exv.exactness = a.exactness && b.exactness; 

		while (exv.size > 1 && exv.num[exv.size - 1] == 0) --exv.size;
		if (exv.size == 1 && exv.num[0] == 0) exv.nonnegative = true;

		return exv;
	}