3
$\begingroup$

Can a rational number $a/b$ (with $b$ coprime to a prime number $p$) be recovered efficiently from a $p$-adic expansion of the form $$\frac{a}{b}=\sum_{j=0}^\infty x_jp^j,\ x_j\in\{0,\ldots,p-1\}\ ?$$

(The prime $p$ is typically fairly small.)

Suppose I have an approximation $\sum_{j=0}^Nx_jp^j$ congruent to $a/b\pmod{p^{N+1}}$ such that $N\log p>\log a+\log b$ (where the inequality is not too sharp, say the difference is at least equal to some not too small constant $C=C(p)$), can I recover $a$ and $b$ easily from its first $(N+1)$ $p$-adic digits $x_0,\ldots,x_n$ in $\{0,\ldots,p-1\}$?

In a perfect world this would be done by an analogue of the continued fraction expansion. I am ignorant if such a thing survived the Big-Bang.

This would be useful in some circonstances where $p$-adic computations are much easier than computations with real (or rational) numbers.

$\endgroup$
3
  • 6
    $\begingroup$ Yes. Look up Gauss lattice basis reduction, and apply it to $\{(x\pmod{p^k} , 1) , (p^k,0)\}$. $\endgroup$ Commented Sep 9, 2021 at 10:06
  • 4
    $\begingroup$ In Pari/GP: $z=355/113+O(7^{20})$; bestappr(z,10^10) answers 355/113. Even better: $z=\sqrt{-1+\sqrt{-1+O(5^{20})}}$;algdep(z,4) answers $x^4+2*x^2+2$. $\endgroup$ Commented Sep 9, 2021 at 10:28
  • $\begingroup$ Thank you very much. $\endgroup$ Commented Sep 9, 2021 at 10:42

0

You must log in to answer this question.

Browse other questions tagged .