Kowalik & Osborne function (lmder1 test #9)

def _lmder1_kowalik_osborne():
    """Kowalik & Osborne function (lmder1 test #9)"""
    v = np.asfarray([4, 2, 1, 0.5, 0.25, 0.167, 0.125, 0.1, 0.0833, 0.0714, 0.0625])
    y2 = np.asfarray([0.1957, 0.1947, 0.1735, 0.16, 0.0844, 0.0627, 0.0456,
                      0.0342, 0.0323, 0.0235, 0.0246])

    def func(params, vec):
        tmp1 = v * (v + params[1])
        tmp2 = v * (v + params[2]) + params[3]
        vec[:] = y2 - params[0] * tmp1 / tmp2

    def jac(params, jac):
        tmp1 = v * (v + params[1])
        tmp2 = v * (v + params[2]) + params[3]
        jac[0] = -tmp1 / tmp2
        jac[1] = -v * params[0] / tmp2
        jac[2] = jac[0] * jac[1]
        jac[3] = jac[2] / v

    guess = np.asfarray([0.25, 0.39, 0.415, 0.39])

    _lmder1_driver(11, func, jac, guess,
                   0.7289151028829448e-01, 0.1753583772112895e-01,
                   [0.1928078104762493e+00, 0.1912626533540709e+00,
                    0.1230528010469309e+00, 0.1360532211505167e+00])
    _lmder1_driver(11, func, jac, guess * 10,
                   0.2979370075552020e+01, 0.3205219291793696e-01,
                   [0.7286754737686598e+06, -0.1407588031293926e+02,
                    -0.3297779778419661e+08, -0.2057159419780170e+08])