Skip to content

Commit 5406a52

Browse files
Modified condition for numerical comparison to check if atol or rtol are positive numbers
1 parent ee21f63 commit 5406a52

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)