I stumbled across Quote notation and went hog wild. But when I stumbled on a technical detail I received a very discouraging comment:
I think those authors may have been a bit short-sighted, perhaps understandably given the date of publication. Consider that for p=2, the simple fraction 1/10000000019 takes over ten billion bits to represent in this notation! (Essentially because the order or 2 modulo 10000000019 is 10000000018.) And it's not much better for p=3 or p=5, either: in both those cases the repeating part has period 5000000009.
... This isn't a case of pathological corners, it's a systemic problem in the whole representation scheme. No matter what base p you use, you can expect most fractions of the form m / n to require on the order of phi(n) digits for the repeating part in that base (where phi is Euler's totient function). Sometimes it'll be exactly phi(n) digits, sometimes phi(n) / 2 or something smaller, and occasionally you'll get lucky and the repeating part will be much shorter than phi(n) digits. But those short cases are the exception, rather than the rule.
So is this a fatal flaw in the p-adic representation of numbers for a calculator program? Is there a better representation which overcomes this difficulty? I've also been led to Exact arithmetic on the Stern–Brocot tree. Does this representation fare better for computer use?
More specifically, is there a representation of rational numbers whose bound is smaller than the totient function?