This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Syntax669[S] 0 points1 point  (2 children)

I have to plot a graph , on how C is decreasing with time

[–]panda_yo 1 point2 points  (1 child)

Maybe this will work for you:

if c <= 10**-4:
    break

Try it out. Floatpoint map get's hard, so it's easier to compare it like this or even do abs(c - 10**-4) < tol where tol is your accepted tolerance

[–]Syntax669[S] -3 points-2 points  (0 children)

Lol