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

Gcd no longer returns standard associates? #3212

Closed
ThomasBreuer opened this issue Jan 22, 2019 · 2 comments · Fixed by #3227
Closed

Gcd no longer returns standard associates? #3212

ThomasBreuer opened this issue Jan 22, 2019 · 2 comments · Fixed by #3227
Labels
kind: bug: wrong result Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them regression A bug that only occurs in the branch, not in a release
Milestone

Comments

@ThomasBreuer
Copy link
Contributor

The following happens in GAP 4.10.0 as well as in the current master branch,
with or without packages loaded.

gap> x:= Indeterminate( Rationals, "x" );;
gap> g:= Gcd( x-2, x^2-2*x );
-1/2*x+1
gap> StandardAssociate( g );
x-2

Up to GAP 4.9, the value returned by Gcd was the standard associate.
Thanks to Meinolf Geck for this observation.

I think this changed behavior is a bug, the documentation of Gcd says:

Gcd returns the standard associate (see StandardAssociate (56.5-5)) of the
greatest common divisors.

@ThomasBreuer ThomasBreuer added kind: bug: wrong result Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them regression A bug that only occurs in the branch, not in a release backport-to-4.10 labels Jan 22, 2019
@fingolfin
Copy link
Member

This regression was introduced in commit fb0cdaf by @hulpke

hulpke added a commit to hulpke/gap that referenced this issue Jan 23, 2019
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Jan 23, 2019
fingolfin pushed a commit to hulpke/gap that referenced this issue Jan 24, 2019
fingolfin pushed a commit that referenced this issue Jan 24, 2019
fingolfin pushed a commit that referenced this issue Jan 24, 2019
@olexandr-konovalov
Copy link
Member

The fix has been backported to stable-4.10 in commit 9a6034d

@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.1 milestone Jan 26, 2019
hulpke added a commit to hulpke/gap that referenced this issue Feb 12, 2019
ssiccha pushed a commit to ssiccha/gap that referenced this issue Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: wrong result Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them regression A bug that only occurs in the branch, not in a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants