Different data type giving different answers

can't we compare two float or two double value? when i am taking float as data type my code giving different answer than when i takes double and i need to compare 2 numerals in that program.well 1 of those value which i am comparing is a+b
where a is given number and b is result of sqrt function. i.e i am adding two double values and comparing with third double value.
You can using ==, but you should read this:
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17
Topic archived. No new replies allowed.