You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably the "Expected Behavior" that I suggested is not completely correct. I think bounds should be considered to be an aid to the algorithm, not a restriction on the output. So the method should either return a valid logarithm, or raise a ValueError (because there is no logarithm within the specified bounds). And this behaviour should be documented.
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
Checklist
The text was updated successfully, but these errors were encountered: