def fast_pow_recursive(x, n):
    """
    This method divides the power problem into sub-problems of size n/2
    and compute the sub-problems recursively.

    This function support float x and negative n

    - Time Complexity: O(log n)
    - Space Complexity: O(n)
    - Algorithmic Paradigm: Divide and conquer.

    :param x: given number
    :type x: int or float
    :param n: given exponential
    :type n: int
    :return: result of pow
    :rtype: int
    """
    if n == 0:
        return 1
    tmp = fast_pow_recursive(x, int(n / 2))
    if n % 2 == 0:
        return tmp * tmp
    elif n > 0:
        return tmp * tmp * x
    else:
        return tmp * tmp / x