def _simpsons_inner(f, a, f_a, b, f_b):
    """Calculate the inner term of the adaptive Simpson's method.

    Parameters
    ----------
    f : callable
        Function to integrate.
    a, b : float
        Lower and upper bounds of the interval.
    f_a, f_b : float
        Values of `f` at `a` and `b`.

    Returns
    -------
    m : float
        Midpoint (the mean of `a` and `b`).
    f_m : float
        Value of `f` at `m`.
    whole : float
        Simpson's method result over the interval [`a`, `b`].

    """
    # pprint({k: format(v, '0.3f') for k, v in locals().items() if k != 'f'})
    m = (a + b) / 2
    f_m = f(m)
    return (m, f_m, abs(b - a) / 6 * (f_a + 4 * f_m + f_b))