Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default output validation fails for inf and nan answer #193

Open
RagnarGrootKoerkamp opened this issue Apr 6, 2021 · 0 comments
Open

Default output validation fails for inf and nan answer #193

RagnarGrootKoerkamp opened this issue Apr 6, 2021 · 0 comments

Comments

@RagnarGrootKoerkamp
Copy link
Contributor

RagnarGrootKoerkamp commented Apr 6, 2021

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:

validator = validate.OutputValidator(p, Path('/path/to/problemtools/support/default_validator/default_validator.cc'))

and run pytest -k default_output from the repository root.

CC @ludopulles who found this

@RagnarGrootKoerkamp RagnarGrootKoerkamp changed the title Default output validation fails for inf and nan Default output validation fails for inf and nan answer Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant