Skip to main content
2 of 2
Improve question based on comment.

How to recover integer part from known fractional root part?

Suppose you have $r=n+f$ where $n\in\mathbb{N}$ and $f\in (0,1)$. I know that $r^2$ is an integer and I can also get as many digits of $f$ as I like, is there a way to recover the value of $n$?

Thank you.

Edit 1: This might be a slightly better question: Given a bound $R>r$, is there an algorithm to determine all values of $n$ such that $r^2$ is an integer? [Thank you Steven for the observation.]