




'''simple docstring'''





from functools import lru_cache





@lru_cache
def UpperCAmelCase						(					UpperCAmelCase_	):
    if not isinstance(UpperCAmelCase_      ,  UpperCAmelCase_	):
        raise TypeError("""k must be an integer."""	)
    if k < 0:
        raise ValueError("""k integer must be greater or equal to zero."""	)
    if k == 0:
        return 0
    elif k == 1:
        return 1
    else:
        return fibonacci(k - 1	) + fibonacci(k - 2	)





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_	):
    _a							:       Any       					=			len(UpperCAmelCase_	)
    # Find m such that F_m >= n where F_i is the i_th fibonacci number.
    _a							:       Union[str, Any]       					=			0
    while True:
        if fibonacci(UpperCAmelCase_	) >= len_list:
            _a							:       int       					=			i
            break
        i += 1
    _a							:       List[Any]       					=			0
    while fibb_k > 0:
        _a							:       Optional[Any]       					=			min(
            offset + fibonacci(fibb_k - 1	)      ,  len_list - 1	)  # Prevent out of range
        _a							:       str       					=			arr[index_k]
        if item_k_1 == val:
            return index_k
        elif val < item_k_1:
            fibb_k -= 1
        elif val > item_k_1:
            offset += fibonacci(fibb_k - 1	)
            fibb_k -= 2
    else:
        return -1


if __name__ == "__main__":
  import doctest

  doctest.testmod()








'''simple docstring'''





from math import exp





def UpperCAmelCase						(					UpperCAmelCase_	):
    return 8 * x - 2 * exp(-x	)





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_      ,  UpperCAmelCase_	):
    _a							:       Optional[int]       					=			lower_bound
    _a							:       str       					=			upper_bound
    for _ in range(0      ,  UpperCAmelCase_	):
        _a					,   _a							:       List[str]       					=			xa, xa - (f(UpperCAmelCase_	) * (xa - xa)) / (f(UpperCAmelCase_	) - f(UpperCAmelCase_	))
    return xa


if __name__ == "__main__":
  print(F"""Example: {secant_method(1, 3, 2)}""")


