From fe30f0c6babdd72f60cccc9c9d77b8b14b2cd4c3 Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Sat, 2 May 2020 01:05:46 -0500 Subject: [PATCH] Fixed a bug in the tolerance calculation. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 2cdc997..43eeb6b 100755 --- a/main.py +++ b/main.py @@ -173,7 +173,7 @@ for r in res: t = tokenizer.replace_variables(tokens, list(r)) #tokenizer.print_token_list(t) result = calc_engine.calculate_results(t) - if result <= int(exp.wrong_response(1 + tolerance)) and result >= int(exp.wrong_response(1 - tolerance)): + if result <= int(exp.wrong_response * (1 + tolerance)) and result >= int(exp.wrong_response * (1 - tolerance)): if not result in answers: answers[result] = t #if result <= tol and result >= int(exp.wrong_response - exp.wrong_response * tolerance):