Precision Error

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
taskin
New poster
Posts: 22
Joined: Sun Jan 01, 2006 1:43 pm
Location: Bangladesh

Precision Error

Post 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.
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho »

This depends on the problem.
But I think 1e-15 is too small. I ususally use 1e-9 or even 1e-6.
Post Reply

Return to “C++”