Closed
Description
Steps To Reproduce
sage: Kp = GF(5)
sage: g = Kp(3)
sage: a = Kp(1)
sage: dl = discrete_log(a, g, bounds=(1, 2), operation="*")
sage: print(g ** dl == a, dl)
False 2
Expected Behavior
A ValueError
should be raised, because there is no solution within the specified bounds.
Actual Behavior
discrete_log
returns a value that is not a valid logarithm.
Additional Information
Reported in this sage_devel thread.
Environment
Various.
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide