Found this very good article on the issues with float precision and using them in comparisons:
Comparing Floating Point Numbers
It was key to solving a crafty bug that only occured in a very particular instance of the program settings and only using an -O2 build, after debugging i realised it had to be the float comparisons in a statement. The article was a wake up call!
cheers.