#23845 closed defect (fixed)

Doctest improvements to symbolic GCD

Reported by: rws Owned by:
Priority: major Milestone: sage-8.2
Component: symbolics Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 41ea681 (Commits) Commit: 41ea6818fb163a2f17cb8152c686f25a384f0edf
Dependencies: #23950 Stopgaps:

Description

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.

Change History (14)

comment:1 Changed 17 months ago by rws

  • Dependencies changed from pynac-0.7.12 to #23950
  • Report Upstream changed from Fixed upstream, in a later stable release. to N/A

comment:2 Changed 16 months ago by frederichan

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

comment:3 Changed 16 months ago by rws

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.

comment:4 Changed 16 months ago by rws

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

comment:5 Changed 15 months ago by rws

  • Dependencies changed from #23950 to #23950, #24262
  • Milestone changed from sage-8.1 to sage-8.2

comment:6 Changed 15 months ago by charpent

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

comment:7 Changed 14 months ago by rws

  • Branch set to u/rws/doctest_improvements_to_symbolic_gcd

comment:8 Changed 14 months ago by git

  • Commit set to 0aa6a9875f09aa668972c58c1bc5d69e3a461179

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

0aa6a9823845: Doctest GCD bug fix

comment:9 Changed 14 months ago by rws

  • Authors set to Ralf Stephan
  • Status changed from new to needs_review

comment:10 Changed 14 months ago by tscrim

  • Reviewers set to Travis Scrimshaw

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

comment:11 Changed 14 months ago by git

  • Commit changed from 0aa6a9875f09aa668972c58c1bc5d69e3a461179 to 41ea6818fb163a2f17cb8152c686f25a384f0edf

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

41ea68123845: cosmetics

comment:12 Changed 14 months ago by rws

  • Status changed from needs_review to positive_review

Thanks.

comment:13 Changed 14 months ago by vbraun

  • Dependencies changed from #23950, #24262 to #23950

comment:14 Changed 14 months ago by vbraun

  • Branch changed from u/rws/doctest_improvements_to_symbolic_gcd to 41ea6818fb163a2f17cb8152c686f25a384f0edf
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.