Page 1 of 1

Precision Error

Posted: Fri Apr 07, 2006 9:25 am
by taskin
how can i solve prescision error when comparing to long double value?

i use fabs(a - b) <= EPS where EPS is 1e-15, but its not working.
use fabs(a - b) < EPS also but its not working again.

Posted: Fri Apr 07, 2006 5:43 pm
by Cho
This depends on the problem.
But I think 1e-15 is too small. I ususally use 1e-9 or even 1e-6.