Given two positive coprime integers $a$ and $b$, we can apply the extended Euclidean algorithm to compute the smallest positive integers $x$ and $y$ satisfying that $ax-by=1$. We can see that $0<x<b$.
Let's say both $a$ and $b$ are extremely large (for example, $a=12^{12^{12}}$ and $b=13^{13^{13}}$) so that we can not directly apply the algorithm to compute $x$ and $y$. The question is how to determine whether $x$ is larger than $\frac{b}{2}$?
Another related problem is how to compute $x \ mod \ p$ given a prime $p$.