def raise_power(num, pow):
    """Raise the number to the given power"""
    # Negative powers are 1 over the positive version
    if pow < 0:
        result = raise_power(num, -pow)
        return 1 / result

    # Base cases
    if pow == 0:
        return 1
    if pow == 1:
        return num

    # Recurse and multiply until reaching 1
    return num * raise_power(num, pow - 1)