How many constraints are in each && expression, exactly? Do you really mean there are 2^40 expressions joined by &&, or that you have 2^40 sets of lower_k and upper_k bounds, or something else? The order of 0x88405 mod 2^24 is 2^22, does that induce duplicated or contradicted constraints? The constant 0x88405 is invertible mod 2^24, can you multiply each constraint by 0x88405^-1 mod 2^24 sufficient times so that every constraint reads like this, for some j = j(k)? lower_k * 0x88405^-j <= x < upper_k * 0x88405^-j If yes, then could you proceed one constraint at a time hoping the intersection of all possible values for x will shrink to nothing? On 10/11/19 11:51 , Mike Stay wrote:
I'd like to efficiently find solutions to constraints of the form
lower1 <= ((x * 0x000001) mod 2^24) < upper1 && lower2 <= ((x * 0x088405) mod 2^24) < upper2 && lower3 <= ((x * 0x652819) mod 2^24) < upper3 && ... where the constants are consecutive powers of 0x088405. Brute-forcing the space isn't much work to do for a single set of upper and lower bounds, but when I've got 2^40 such sets, it's daunting.
Any ideas?