Skip to content

Doctest improvements to symbolic GCD #23845

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

Closed
rwst opened this issue Sep 13, 2017 · 18 comments
Closed

Doctest improvements to symbolic GCD #23845

rwst opened this issue Sep 13, 2017 · 18 comments

Comments

@rwst
Copy link
Contributor

rwst commented Sep 13, 2017

The following all give errors:

sage: gcd(I-I*x, x^2-1)
sage: gcd(I+I*x, x^2-1)
sage: alg = SR(QQbar(sqrt(2)+I*sqrt(3)))
sage: gcd(alg+alg*x, x^2-1)
sage: gcd(alg-alg*x, x^2-1)
sage: sqrt2 = SR(QQbar(sqrt(2)))
sage: gcd(sqrt2+sqrt2*x, x^2-1)
sage: gcd(sqrt2-sqrt2*x, x^2-1)

This is fixed in Pynac master and should be doctested here.

Note that although Singular supports algebraic GCD Pynac uses Singular only in rational mode. Use a dedicated polynomial ring instead of symbolics if you want algebraic GCD.

Depends on #23950

Component: symbolics

Author: Ralf Stephan

Branch/Commit: 41ea681

Reviewer: Travis Scrimshaw

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

@rwst rwst added this to the sage-8.1 milestone Sep 13, 2017
@rwst
Copy link
Contributor Author

rwst commented Oct 2, 2017

Changed dependencies from pynac-0.7.12 to #23950

@rwst
Copy link
Contributor Author

rwst commented Oct 2, 2017

Changed upstream from Fixed upstream, in a later stable release. to none

@frederichan-IMJPRG
Copy link
Contributor

comment:2

Can you reproduce this, I have with 8.1beta9:

sage: x=SR('x')
sage: P=(x+1)^2+1
sage: gcd(P,P.expand())
1

@rwst
Copy link
Contributor Author

rwst commented Nov 4, 2017

comment:3

Confirmed. We don't expand automatically because products allow quick solutions and need time to expand. I should add this to the ex.gcd docstring.

@rwst
Copy link
Contributor Author

rwst commented Nov 4, 2017

comment:4

Maybe this can be fixed. If so, this ticket will add doctests.

@rwst
Copy link
Contributor Author

rwst commented Nov 21, 2017

Changed dependencies from #23950 to #23950, #24262

@rwst rwst modified the milestones: sage-8.1, sage-8.2 Nov 21, 2017
@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Nov 22, 2017

comment:6

#24262 fixes the problem. No doctests yet, as far as I can tell...

@rwst
Copy link
Contributor Author

rwst commented Dec 26, 2017

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 26, 2017

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

0aa6a9823845: Doctest GCD bug fix

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 26, 2017

Commit: 0aa6a98

@rwst
Copy link
Contributor Author

rwst commented Dec 26, 2017

Author: Ralf Stephan

@tscrim
Copy link
Collaborator

tscrim commented Dec 27, 2017

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Dec 27, 2017

comment:10

Trivial typo: kind -> kinds. You can set a positive review once done.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2017

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

41ea68123845: cosmetics

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 27, 2017

Changed commit from 0aa6a98 to 41ea681

@rwst
Copy link
Contributor Author

rwst commented Dec 27, 2017

comment:12

Thanks.

@vbraun
Copy link
Member

vbraun commented Dec 28, 2017

Changed dependencies from #23950, #24262 to #23950

@vbraun
Copy link
Member

vbraun commented Dec 29, 2017

Changed branch from u/rws/doctest_improvements_to_symbolic_gcd to 41ea681

This was referenced Dec 12, 2017
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

4 participants