Advertisement
Guest User

Untitled

a guest
Sep 24th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. def bisec(fun, a, b, eps=0.0001):
  2. while
  3. c = (a+b)/2
  4.  
  5. if np.sign(fun(a)) != np.sign(fun(c)):
  6. b = c
  7. else:
  8. a = c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement