Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compare if 2 numbers are relatively equal

from math import isclose
a = 1.0
b = 1.00000001
isclose(a, b, rel_tol=1e-9, abs_tol=0.0)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #numbers #equal
ADD COMMENT
Topic
Name
4+8 =