Skip to content

Commit aadf477

Browse files
Merge pull request #76 from lambda-feedback/tr112-atol-rtol-zero-behaviour
Modified condition for numerical comparison to check if atol or rtol…
2 parents ee21f63 + 5406a52 commit aadf477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/evaluation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def check_equality(response, answer, params, eval_response) -> dict:
152152
error_below_rtol = None
153153

154154
if eval_response.is_correct is False:
155-
if params.get("numerical", False) or params.get("rtol", False) or params.get("atol", False):
155+
if params.get("numerical", False) or float(params.get("rtol", 0)) > 0 or float(params.get("atol", 0)) > 0:
156156
# REMARK: 'pi' should be a reserved symbol but it is sometimes not treated as one, possibly because of input symbols.
157157
# The two lines below this comments fixes the issue but a more robust solution should be found for cases where there
158158
# are other reserved symbols.

0 commit comments

Comments
 (0)