After having gone through several articles on here and searching, there are many good solutions to comparing floating point numbers.
Such as the Boost library: http://www.boost.org/doc/libs/1_34_0/libs/test/doc/components/test_tools/floating_point_comparison.html
I have the Boost library available to me and so I want to use it. However, I am having trouble getting a simple example to show me how to get a boolean return value when comparing two floating point numbers.
For instance, they show examples like so: http://www.boost.org/doc/libs/1_50_0/libs/test/doc/html/utf/testing-tools/reference.html
But that doesn't return a boolean.
Psuedo code example:
double a = 1.0;
double b = 0.5+0.5;
double percentage = 0.00001; //0.001 %
//Now I want to use the boost library to do something like this:
bool isClose = check_is_close(a, b, percentage);
I'm just having trouble finding out how to get a bool back.
I had been working mostly in Java, Python, and Matlab for a few years, so C++ is kind of like a foreign language to me right now.
Please help!