Terry Reedy <tjre...@udel.edu> writes: > But fails with remainder 0, as others noted. Lesson: include corner > cases in validation test. Anyway, my main point about writing a clear > spec remains true.
My validation test for this was to loop both numerator and denominator from -5 to 5 (skipping denominator 0) to cover all cases (comparing against the original post's unoptimized code) without having to think about a minimal set to cover them. -- https://mail.python.org/mailman/listinfo/python-list