An awkward question comes up in code golf specs as to whether answer code is to be judged as running on a theoretical machine, an actual one with finite precision and memory, or somewhere in between. For example, see feersum's comments on Find the simplest value between two values that two posted answers arguably fail for large values due to limits of float representation.
For my question, I edited the spec afterwards to try to handwave away such limits, but I'd like to ask the community opinion on how and if to do this. It would also be nice to have a general agreement or standard options to avoid disagreements and avoid fiddly boilerplate in specs.
What are your thoughts on:
- Should questions specify bounds and precisions for inputs?
- Can and should questions handwave-away overflow and precision issues?
- Is it OK to submit answers that "eventually" give the answer, like one that loops through all
2^64
machine-representable integers regardless of input size? - Should answers have to handle extreme cases like inputs 1 away from overflow?
- Are answers responsible for machine-precision failures like
21.0/7.0>3.0
? - What about stack-overflows for recursive code without tail-recursion?