You only need Big Decimal if $R$ is big. For $R$ not too large, not only can you use ordinary integers, you can brute-force the solution.
For example, with $R=254,$ just try each integer value of $x$ from $x=0$ to $x=254,$ and set $s = R^2 - x^2.$ Apply the floating-point square root function to that result, that is, take q = sqrt(s)
, round the return value q
to an integer, set $y$ to the rounded value, and then check whether
$y^2 = R^2 - x^2.$ If it is equal, that value of $(x,y)$ is a point on the circle, otherwise there is no such lattice point with that $x$-coordinate.
You can even avoid floating-point calculations entirely if you just "guess" the value of $y$ each time. When $R=254,$ for $x=0$ you know $y=254,$
and you know that $y$ for the next lattice point will be less, so for
$x=1$ you guess $y=254- 1 = 253$ and see if $(x,y)$ is a lattice point.
Each time you make such a guess, if it turns out $x^2 + y^2 > R^2$
then you decrease $y$ by $1$ and try again with the same $x$;
if $x^2 + y^2 < R^2$ then you keep the same $y$ but increase $x$ by $1$;
and if $x^2 + y^2 = R^2$ then you remember the fact that $(x,y)$
is a lattice point on the circle, and for your next guess you
add $1$ to $x$ and subtract $1$ from $y.$
If you use $64$-bit integers these "brute force" approaches work up to
$R \approx 2{,}000{,}000{,}000,$
although somewhere between $R=254$ and $R = 2{,}000{,}000{,}000$
you might find that the brute-force approach takes so much computing time
that you want to implement the cleverer solution already explained
in another answer (involving the factorization of $R$).