Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any_root() sometimes fails over finite fields #21998

Closed
saraedum opened this issue Nov 30, 2016 · 11 comments
Closed

any_root() sometimes fails over finite fields #21998

saraedum opened this issue Nov 30, 2016 · 11 comments

Comments

@saraedum
Copy link
Member

sage: K.<a> = GF(2^4)
sage: R.<x> = K[]
sage: f = x^2 + x + a^2 + a
sage: f.any_root()
ValueError
sage: f.any_root()
a

The algorithm is randomized. It sometimes fails because of a typo.

CC: @roed314

Component: finite rings

Author: Julian Rüth

Branch/Commit: e5bcffa

Reviewer: David Roe

Issue created by migration from https://trac.sagemath.org/ticket/21998

@saraedum saraedum added this to the sage-7.5 milestone Nov 30, 2016
@saraedum

This comment has been minimized.

@saraedum
Copy link
Member Author

@saraedum
Copy link
Member Author

Commit: ec1b78b

@saraedum
Copy link
Member Author

New commits:

ec1b78bfix typo in any_root()

@roed314
Copy link
Contributor

roed314 commented Nov 30, 2016

Reviewer: David Roe

@roed314
Copy link
Contributor

roed314 commented Nov 30, 2016

comment:4

Oops. Looks good.

@vbraun
Copy link
Member

vbraun commented Nov 30, 2016

comment:5

I'm getting

6082sage -t --long src/sage/rings/polynomial/polynomial_element.pyx
6083**********************************************************************
6084File "src/sage/rings/polynomial/polynomial_element.pyx", line 1777, in sage.rings.polynomial.polynomial_element.Polynomial.any_root
6085Failed example:
6086    (x**2+x+1).any_root() # used to loop
6087Expected:
6088    Traceback (most recent call last):
6089    ...
6090    ValueError: no roots A 1
6091Got:
6092    a^7 + a^6 + a^4 + a^2 + a + 1
6093**********************************************************************
6094File "src/sage/rings/polynomial/polynomial_element.pyx", line 1810, in sage.rings.polynomial.polynomial_element.Polynomial.any_root
6095Failed example:
6096    f.any_root()
6097Expected:
6098    a
6099Got:
6100    a + 1
6101**********************************************************************
61021 item had failures:
6103   2 of  34 in sage.rings.polynomial.polynomial_element.Polynomial.any_root
6104    [2127 tests, 2 failures, 54.92 s]

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

1c38d17Fix any_root() doctest
e5bcffaFix doctest

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 1, 2016

Changed commit from ec1b78b to e5bcffa

@roed314
Copy link
Contributor

roed314 commented Dec 1, 2016

comment:8

If the patchbot gives it a thumbs up, you can go ahead and set it to positive review.

@vbraun
Copy link
Member

vbraun commented Dec 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants