Mathematica has trouble solving this Diophantine inequality:
(* givens *)
e = 653315732497285855855422606783
f = 1697172185816328002847853765504
g = 1650189636468405601822430434691
h = 2622176396697944576102111774652
m = 10^10
FindInstance[Abs[a f (g + d h) - b h (e + c f)] < m
&& 0 < c && c < a && a < m && 0 < d && d < b && b < m,
{a, b, c, d}, Integers]
nsmet: The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist.
How can we help it?
Note: if that helps, the context insures Abs[a d - b c] < m. But adding that condition does not seem to improve things.
There are at least two solutions:
{{a -> 9861328816, b -> 6913952452, c -> 6835352265, d -> 4792386648},
{a -> 7395996612, b -> 5185464339, c -> 6835352265, d -> 4792386648}}
See this question on the Cryptography Stack for context.
Update: I simplified the problem thru some simple modular arithmetic (see how in the related question on math-SE) but still hit a wall:
(* givens *)
e = 653315732497285855855422606783
f = 1697172185816328002847853765504
g = 1650189636468405601822430434691
h = 2622176396697944576102111774652
m = 10^10
(* derived quantities *)
l = GCD[f, h];
mm = Ceiling[m/l];
ff = f/l;
hh = h/l;
gg = PowerMod[g ff, -1, hh];
ee = PowerMod[-e hh, -1, ff];
FindInstance[Mod[gg s, hh]<m && Mod[ee s, ff]<m && -mm<s && s!=0 && s<mm, s, Integers]
mpwc: FindInstance was unable to convert $\left\lfloor\frac{356075003617676589725598337103\,s}{424293046454082000711963441376}\right\rfloor$ to Piecewise because the required number 4196097564 of piecewise cases sought exceeds the internal limit $MaxPiecewiseCases = 100.
Update: Problem solved! But I would love to know how to have Mathematica rather than me make the math, even for the last step!
Reduce[a f (g + d h) - b h (e + c f) < m && 0 < c && c < a && a < m && 0 < d && d < b && b < m && a f (g + d h) - b h (e + c f) > -m, {a, b, c, d}, Reals]may be useful. Only the two last cases lead to integer solutions. – user64494 Dec 08 '20 at 18:14$MaxPiecewiseCases = 10^10;and executing your modified code,I obtain "FindInstance::nsmet: The methods available to FindInstance are insufficient to find the requested instances or prove they do not exist.". Every soft has its limitations. – user64494 Dec 09 '20 at 10:09