Rewrite repeating-decimal vars to be more correct

Fixes #58635.

Test Plan:
adding_and_subtracting_rational_numbers.html?seed=113&problem=repeating-decimals was not completely unreasonable.

Auditors: peter