alexbprofit / academicpaperapp

1 stars 0 forks source link

Equation which have epsilon greather than 0.001 does not work #1

Closed alexbprofit closed 3 years ago

alexbprofit commented 3 years ago

def decomp(a, b, c, p, q, eps): intervals = [] i = p t = 10.0 * eps while i < q: if f(a, b, c, i) * f(a, b, c, i + t) < 0: t = t / 10 i = i + t else: i = i + t if t < eps: intervals.append([i - 3 * t, i + 3 * t]) t = 10 * eps return intervals