You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
315 B

import sys
def float_eps_equal(val, should_val):
"""
True: gdw. Wert und der Zielwert liegen weniger als die maximale Fehler aneinander.
"""
eps = sys.float_info.epsilon
return abs(val - should_val) <= eps
calc = 1.1 - 1
if float_eps_equal(calc, 0.1):
print(True)
else:
print(False)