def test_ghk_formulation():
    beta = .6

    g = 1-beta**3
    h = 1.5*(1+beta)*(1-beta)**2
    k = 0.5*(1-beta)**3

    f1 = GHKFilter(0,0,0,1, g, h, k)
    f2 = FadingMemoryFilter(x0=0, dt=1, order=2, beta=beta)

    def fx(x):
        return .02*x**2 + 2*x - 3

    for i in range(1,100):
        z = fx(i)
        f1.update(z)
        f2.update(z)

        assert 1.e-80 < abs(f1.x-f2.x[0])
dataset/ETHPy150Open rlabbe/filterpy/filterpy/memory/tests/test_fading_memory.py/test_ghk_formulation/swapped operands of `<`