-
Notifications
You must be signed in to change notification settings - Fork 23
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
Hardcoded floating-point answers should be verified more exactly #403
Comments
I don't understand the first paragraph. Why did decreasing the precision make the hardcoded value wrong/require it to be updated? Or was it just wrong from the beginning and due to the change in precision this was unnoticed? And my second question is why was it not generated in the first place? Or to be more precise: for problems with fixed output (i.e. those using |
So, before the input was, say So indeed the fix we did is to write a generator that specifically prints the number of digits we want to show in the samples. Or, we could first 'ignore' given |
Aahhh the input precision was changed not the output precision... now I understand the problem. |
For problem Fractal Area of the BAPC preliminaries 2024, the version used on the 21st of September showed sample answers that were slightly too inexact. Specifically, they differed in the last two digits. The reason here was that the input precision was reduced from 9 to 6 digits, and the sample answer that was hardcoded in$10^{-7}$ .
generators.yaml
was not updated. However, all jury submissions still passed, because the error was smaller thanTo prevent this, BAPCtools could perform a more exact match for the hardcoded answers. Specifically, the hardcoded answer should only be allowed to differ in the last digit, and only by one. For Fractal Area, the samples show 9 digits after the$10^{-9}$ rather than $10^{-6}$ .
0.
, so basically, the maximum allowed absolute error for the canonical jury solution on these hardcoded samples should beTo avoid re-inventing the wheel (the wheel here being$10^{-9}$ by counting digits, but we should also handle scientific notation correctly).
default_output_validator.cpp
, perhaps we could modify the arguments passed to this validator when running the canonical jury solution on a hardcoded.ans
file (or any.ans
file, to simplify things). The question then becomes how to detect the value of the last significant digit in this answer (in the example above, this "value" is triviallyThe text was updated successfully, but these errors were encountered: