On Wed, 16 Jul 2003 18:26:19 +0000 (UTC), in comp.lang.c ,
so***@gradient.cis.upenn.edu (Sooha Park Lee) wrote:
I would like to compare two "double" numbers.
To overcome round-off error, I am using the following strategy:
rounding each number and try to convert it into interger by multiplying 10E6.
the "standard" way is to use fabs(a-b) and compare that to some small
constant eg 1e-6 or whatever tolerance you want.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---