public static double power(double base, int exponent) {
		if (base < 0.0000001 && base > -0.0000001 && exponent <= 0) {
			throw new IllegalArgumentException("Invalid input");
		}
		int newExponent = exponent >= 0 ? exponent : -exponent;
//		double result = 1.0;
//		for (int i = 1; i <= newExponent; i++) {
//			result *= base;
//		}
		
		double result=powerWithUnsigned(base,newExponent);
		return exponent >= 0 ? result : 1.0 / result;
	}