Periodic Decimal Numbers

Please write the programs directly into the section programs at the end of this notebook!

Problem

Implement a new datastructure representing rational numbers as finite or periodically infinite decimal numbers and implement some reasonable arithmetic operations available for these objects. Arithmetic operations should comprise at least +, - (both unary and binary), *, /, and (□^(-1)).
Arithmetic should be implemented through a conversion between periodic decimal numbers and rational numbers. The Mathematica function RealDigits and FromDigits must not be used for these conversions, although it might be helpful to consult RealDigits in order to come up with a good layout of the datastructure.

Programs

Tests