Admittedly this is rather pedantic, so feel free to just close, but in case you are interested:
I just added some tests to the BAPCtools default output validator to handle inf, -inf, and nan as possible answers to testcases in the presence of float_tolerance 0.5.
Some cases that problemtools currently fails to handle:
answer
output
expected
actual
inf
inf
ac
wa
inf
INF
ac
wa
inf
-inf
wa
ac
inf
0
wa
ac
-inf
-1
wa
ac
nan
nan
ac
wa
nan
NaN
ac
wa
(You could argue what relative error means in the context of infinite values, but some of these are clearly wrong.)
To run some tests, clone the BAPCtools repository and change line 50 to:
Admittedly this is rather pedantic, so feel free to just close, but in case you are interested:
I just added some tests to the BAPCtools default output validator to handle
inf
,-inf
, andnan
as possible answers to testcases in the presence offloat_tolerance 0.5
.(You could argue what relative error means in the context of infinite values, but some of these are clearly wrong.)
To run some tests, clone the BAPCtools repository and change line 50 to:
and run
pytest -k default_output
from the repository root.CC @ludopulles who found this