Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
L = []
def find_root_recursive(func,a,b,tol=0.000000000001):
    global L
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        find_root_recursive(func,a,x0-tol)       
        find_root_recursive(func,x0+tol,b)       
    except:
        pass


find_root_recursive(sin,-50,50)
L.sort()
L

L = [] def find_root_recursive(func,a,b,tol=0.000000000001): global L try: x0 = find_root(func,a,b) L.append(x0) find_root_recursive(func,a,x0-tol)
find_root_recursive(func,x0+tol,b)
except: pass pass

find_root_recursive(sin,-50,50) L.sort() L

L

L = []
def find_root_recursive(func,a,b,tol=0.000000000001):
    global L
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        find_root_recursive(func,a,x0-tol) 
find_root_recursive(func,x0+tol,b)
except: pass

pass

find_root_recursive(sin,-50,50) L.sort() L

L
L = []
def find_root_recursive(func,a,b,tol=0.000000000001):
    global L
L = []
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        L += find_root_recursive(func,a,x0-tol)       
        L += find_root_recursive(func,x0+tol,b)       
    except:
        pass
    return L
 L = find_root_recursive(sin,-50,50)
L.sort()
L
def find_root_recursive(func,a,b,tol=0.000000000001):
    L = []
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        L += find_root_recursive(func,a,x0-tol)       
        L += find_root_recursive(func,x0+tol,b)       
    except:
        pass
    return L


L = find_root_recursive(sin,-50,50)
L.sort()
L
def find_root_recursive(func,a,b,tol=0.000000000001):
    L = []
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        L += find_root_recursive(func,a,x0-tol) find_root_recursive(func,a,x0-tol,tol)       
        L += find_root_recursive(func,x0+tol,b) find_root_recursive(func,x0+tol,b,tol)       
    except:
        pass
    return L


L = find_root_recursive(sin,-50,50)
L.sort()
L

def find_root_recursive(func,a,b,tol=0.000000000001): L = [] try: x0 = find_root(func,a,b) L.append(x0) L += find_root_recursive(func,a,x0-tol,tol)
L += find_root_recursive(func,x0+tol,b,tol)
except: pass return L L

L = find_root_recursive(sin,-50,50)
L.sort()
L

def find_root_recursive(func,a,b,tol=0.000000000001):
    L = []
    try:
        x0 = find_root(func,a,b)
        L.append(x0)
        L += find_root_recursive(func,a,x0-tol,tol) 
L += find_root_recursive(func,x0+tol,b,tol)
except: pass return L

L
L = find_root_recursive(sin,-50,50)
L.sort()
L