FiSGO.OrderSearch.div_scanned
- div_scanned(factored1, factored2)[source]
Given two tuples originating from PrimesHandler.prime_scanner with the same upper_bound, returns the division of both decompositions.
Idea: if factored1 corresponds to a number n1 and factored2 to n2, then prod_scanned returns Primes.prime_scanner(n1/n2, upper_bound) without having to construct n1/n2 explicitely.
Caution
May return negative factors if the n1/n2 is not an integer! We expect the input to already be correct.
Example:
>>> div_scanned(([3,1],49), ([1,1], 7)) ([2, 0], 7)
- Parameters:
- Return type:
- Returns:
Partially factorized division of the numbers represented by factored1 and factored2.