Kattis / problemtools

Tools to manage problem packages using the Kattis problem package format.
MIT License
101 stars 70 forks source link

warn about problems with impossible precision tolerances #135

Open evouga opened 4 years ago

evouga commented 4 years ago

For a problem with floating-point output that

1) only has an absolute, and no relative, precision tolerance set; 2) contains a test case where the judge data would require more bits of precision than fits in the mantissa of a double to satisfy the specified absolute tolerance;

it would be helpful if problemtools flagged the offending test case and raised a warning. This issue bit us during the NAQ, when the original version of stopcounting (https://naq19.kattis.com/problems/stopcounting) had such an impossible precision configuration.

Of course, the two conditions above are not necessarily a sign of a problem configuration error (perhaps arbitrary-precision floating-point is intended as part of the problem solution) but I think they're a strong enough "smell" that a warning is more helpful than annoying.