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

off-by-one error in real_roots on AA coefficients #3149

Closed
sagetrac-cwitty mannequin opened this issue May 10, 2008 · 4 comments
Closed

off-by-one error in real_roots on AA coefficients #3149

sagetrac-cwitty mannequin opened this issue May 10, 2008 · 4 comments

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented May 10, 2008

The code in real_roots.pyx for handling polynomials with AA coefficients had an off-by-one error in the case of integral coefficients.

Component: commutative algebra

Keywords: editor_craigcitro

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

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-3.1.1 milestone May 10, 2008
@sagetrac-cwitty sagetrac-cwitty mannequin assigned malb May 10, 2008
@malb
Copy link
Member

malb commented Jun 3, 2008

comment:1

Attachment: real-roots-offbyone.patch.gz

@malb malb removed their assignment Jun 3, 2008
@craigcitro
Copy link
Member

Changed keywords from none to editor_craigcitro

@craigcitro
Copy link
Member

comment:3

Looks good. Just so that it's on record:

the 4 -> 6 change simply ups the default precision to which something is computed. The ceil() to floor() + 1 change only applies in the case of an exact answer, and this way the strict inequality requested in the new comment is always satisfied. The doctest exactly checks this.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jun 23, 2008

comment:5

Merged in Sage 3.0.4.alpha0

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jun 23, 2008
@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.1.1, sage-3.0.4 Jun 23, 2008
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

2 participants