Incorrect results may be obtained when comparing floating-point type variables.

The example is a known issue that occurs when comparing floating points. A typical example is the case where the result of comparing x and y is false.
This issue should not be viewed as a bug in the tool, but as an issue that discovered a bug that may occur when the tool does some floating-point comparison operations directly.

In this case, you can write a simple comparison function as in the example above and compare the values within the tolerance to solve it.

Please refer to the link below for more information.

https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
http://devmachine.blog.me/220119534107

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.