def get_fixed_points(func,precision=100000, verbose=False): xfp_func = lambda x: func(x) - x to_return = findzero(xfp_func, (0,20.0), precision=precision, verbose=verbose) new_roots = [] for root in to_return: new_roots.append(np.round(root,decimals=2)) to_return = list(set(new_roots)) to_return.sort() return to_return[1:] # [1:] leaves out the period-0 fixed point
def get_doubling_point(x, n, precision=100000, verbose=False): should_be_zero = lambda r: abs(nth_derivative(x,r,n)) - 1 doubling_point = findzero(should_be_zero, (0.01,20.0), precision=precision,verbose=verbose)[0] return doubling_point