def rootbysecand(f, angle, x0, x1, precision=0.000000001):
    ''' solve the equation when function f(jd, angle) reaches zero by
    Secand method

    '''
    fx0, fx1 = f(x0, angle), f(x1, angle)
    while abs(fx1) > precision and abs(x0 - x1) > precision and fx0 != fx1:
        x2 = x1 - fx1 * (x1 - x0) / (fx1 - fx0)
        fx0 = fx1
        fx1 = f(x2, angle)
        x0 = x1
        x1 = x2
    return x1
 solve the equation when function f(jd, angle) reaches zero by
    Secand method

    
aa_full.py