I want to check if an expression evaluates to Integer result. I know this is never the best solution, but I ran out of ideas and not able to come up with an algorithm to solve the problem in a reasonable time. The only way I have now is bruteforce. I used
big without getting the correct results, then I tried
SymPy. The latter calculated the result correctly but is too slow to solve the full-size problem. Any ideas, thank you.
function sLength(w,v,y) x = w * y // (v + w) s = sqrt(x^2 + w^2) + sqrt((y-x)^2 + v^2) s == trunc(s) end