r"""
    approximate value (due to numerical errors) of fib(n) using closed form
    expression

    Args:
        n (int):

    Returns:
        int: the n-th fib number

    CommandLine:
        python -m utool.util_alg fibonacci_approx

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_alg import *  # NOQA
        >>> import utool as ut
        >>> series = [int(fibonacci_approx(n)) for n in range(20)]
        >>> result = ('series = %s' % (str(series[0:10]),))
        >>> print(result)

def fibonacci_approx(n):
    r"""
    approximate value (due to numerical errors) of fib(n) using closed form
    expression

    Args:
        n (int):

    Returns:
        int: the n-th fib number

    CommandLine:
        python -m utool.util_alg fibonacci_approx

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_alg import *  # NOQA
        >>> import utool as ut
        >>> series = [int(fibonacci_approx(n)) for n in range(20)]
        >>> result = ('series = %s' % (str(series[0:10]),))
        >>> print(result)
    """
    sqrt_5 = math.sqrt(5)
    phi = (1 + sqrt_5) / 2
    return ((phi ** n) - (-phi) ** (-n)) / sqrt_5