private static int calculateFactor(double value)
  {
	int factor = 0;

	while (true)
	{
	  if (factor == MAX_PRECISION - 1)
	  {
		break;
	  }

	  double temp = value * pow(factor);
	  if (temp >= MAX_VALUE.base)
	  {
		break;
	  }

	  if (temp == (long) temp)
	  {
		if (temp == (long) (temp / 10) * 10)
		{
		  factor--;
		}

		break;
	  }

	  factor++;
	}
	return factor;
  }