Nedy88's blog

By Nedy88, 10 years ago, All of us use epsilons in their codes for problems dealing with floating point numbers. Do you have some method of choosing what the value of epsilon to use or use some fixed number. I just solve an old geometry problem: 8D - Two Friends and when I used eps = 1e-9 I failed systests, but when I made eps = 1e-10 my solution passed. This is not the first time I fail because of choosing inappropriate value of eps and I was wondering if you guys use some methods of choosing the value.

PS: In this problem I mainly use epsilon to write a < b + esp instead of a <= b.  Comments (4)
 » Shouldn't it be a + eps < b instead of a < b + eps ?
•  » » 10 years ago, # ^ | ← Rev. 3 →   For a <= b it should be a <= b + EPSFor a < b it should be a + EPS < b
•  » » » Ok, I've read a < b instead of a <= b. My bad.
 » Here's a problem of round 100 ->(problem) that had the problem of epsilon handling...The authors editorial explained about it -(editorial) but I could not understand it...Maybe you top guys can infer something...Then do tell me also :)