Check out example codes for "test valeurs 2 flottants python". It will help you in understanding the concepts better.

Code Example 1

>>> delta = 0.0001
>>> var = 3.0 - 2.7
>>> 0.3 - delta < var < 0.3 + delta
True
>>> abs(var - 0.3) < delta
True

Learn ReactJs, React Native from akashmittal.com