8000 raise ValueError when discrete_log does not exist · Issue #38316 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
raise ValueError when discrete_log does not exist #38316
Closed
@DaveWitteMorris

Description

@DaveWitteMorris

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0