We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aadf477 + 1da8e19 commit 97162cdCopy full SHA for 97162cd
app/evaluation.py
@@ -164,15 +164,15 @@ def replace_pi(expr):
164
return expr.subs(pi_symbol, float(pi))
165
ans = replace_pi(ans)
166
res = replace_pi(res)
167
- if "atol" in params.keys():
+ if float(params.get("atol", 0)) > 0:
168
try:
169
absolute_error = abs(float(ans-res))
170
error_below_atol = bool(absolute_error < float(params["atol"]))
171
except TypeError:
172
error_below_atol = None
173
else:
174
error_below_atol = True
175
- if "rtol" in params.keys():
+ if float(params.get("rtol", 0)) > 0:
176
177
relative_error = abs(float((ans-res)/ans))
178
error_below_rtol = bool(relative_error < float(params["rtol"]))
0 commit comments