Open user202729 opened 10 months ago
If I do, for example,
R.<x, y> = Integers(6)[] small_roots(x, (5, 5))
I get an error:
TypeError: self must be an integral domain.
(I'm not sure why it does not happen when N is a product of two large primes.)
Anyway, I think it's safer to modify the code as follows:
- f /= f.coefficients().pop(0) + leading = 1 / f.coefficients().pop(0) + f = f.map_coefficients(lambda x: x * leading)
The code is functionally equivalent, and does not hit the aforementioned error.
If I do, for example,
I get an error:
(I'm not sure why it does not happen when N is a product of two large primes.)
Anyway, I think it's safer to modify the code as follows:
The code is functionally equivalent, and does not hit the aforementioned error.