Write here if you have problems with your C++ source code
Moderator: Board moderators
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.
- New poster
- Posts: 22
- Joined: Sun Jan 01, 2006 1:43 pm
- Location: Bangladesh
This depends on the problem.
But I think 1e-15 is too small. I ususally use 1e-9 or even 1e-6.
- A great helper
- Posts: 274
- Joined: Wed Oct 20, 2004 11:51 pm
- Location: Hong Kong
Return to C++
Who is online
Users browsing this forum: No registered users and 0 guests