Блог пользователя Nedy88

Автор Nedy88, 13 лет назад, По-английски

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.

  • Проголосовать: нравится
  • +35
  • Проголосовать: не нравится

»
13 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Shouldn't it be a + eps < b instead of a < b + eps ?

»
13 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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 :)