I have read multiple articles regarding floating point variables comparison, but failed to understand and get the required knowledge from those articles. So, here I am posting t
It's because floats have 7 digit precision. If you want better precision you need to use double or long double.