Skip to content

Doctest: Fix collect_common_factors() to accept any expression #21009

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

Open
rwst opened this issue Jul 12, 2016 · 18 comments
Open

Doctest: Fix collect_common_factors() to accept any expression #21009

rwst opened this issue Jul 12, 2016 · 18 comments

Comments

@rwst
Copy link
Contributor

rwst commented Jul 12, 2016

Visible already in sage-7.1v, difficult to get a good minimal test case.

sage: (1/24*((sqrt(3)*2^(2/3)*gamma(1/3) + I*2^(2/3)*gamma(1/3))/pi + 4*2^(2/3)*gamma(1/3)/(pi*(sqrt(3) + I)))/x^(1/3)).collect_common_factors()
1/24*2^(2/3)*(sqrt(3) + 4/(sqrt(3) + I) + I)*gamma(1/3)/(pi*x^(1/3))
sage: (1/24*((I*2^(2/3)*gamma(1/3))/pi + 4*2^(2/3)*gamma(1/3)/(pi*(sqrt(3) + I)))/x^(1/3)).collect_common_factors()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-6-c25fe41fc3c2> in <module>()
----> 1 _.collect_common_factors()

/home/ralf/sage-7.1v/src/sage/symbolic/expression.pyx in sage.symbolic.expression.Expression.collect_common_factors (/home/ralf/sage-7.1v/src/build/cythonized/sage/symbolic/expression.cpp:37782)()
   6649         sig_on()
   6650         try:
-> 6651             x = g_collect_common_factors(self._gobj)
   6652         finally:
   6653             sig_off()

ValueError: divide: arguments must be polynomials over the rationals

Depends on #23325

Component: symbolics

Author: Ralf Stephan

Branch/Commit: u/rws/doctest__fix_collect_common_factors___to_accept_any_expression @ 1597fed

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

@rwst rwst added this to the sage-7.3 milestone Jul 12, 2016
@rwst

This comment has been minimized.

@rwst rwst modified the milestones: sage-7.3, sage-8.1 Jun 13, 2017
@rwst rwst changed the title Fix symbolic GCD to accept any expression Fix collect_common_factors() to accept any expression Jun 13, 2017
@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

comment:2

We now get with Sage-8.0

sage: (1/24*((I*2^(2/3)*gamma(1/3))/pi + 4*2^(2/3)*gamma(1/3)/(pi*(sqrt(3) + I))
....: )/x^(1/3)).collect_common_factors()
....: 
1/24*2^(2/3)*(4/(sqrt(3) + I) + I)*gamma(1/3)/(pi*x^(1/3))

@rwst rwst removed this from the sage-8.1 milestone Aug 11, 2017
@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

comment:3

Actually the fix was unintentional and is in Pynac-0.7.10. This will add doctests.

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

Dependencies: #23225

@rwst rwst added this to the sage-8.1 milestone Aug 11, 2017
@rwst rwst changed the title Fix collect_common_factors() to accept any expression Doctest: Fix collect_common_factors() to accept any expression Aug 11, 2017
@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

Changed dependencies from #23225 to #23325

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

comment:6

Sorry.

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

Commit: e77531e

@rwst
Copy link
Contributor Author

rwst commented Aug 11, 2017

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

Changed commit from e77531e to none

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

Author: Ralf Stephan

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

New commits:

1597fed21009: doctest

@rwst
Copy link
Contributor Author

rwst commented Nov 26, 2017

Commit: 1597fed

@rwst rwst removed this from the sage-8.1 milestone Nov 26, 2017
@rwst rwst added this to the sage-8.2 milestone Nov 26, 2017
@tscrim
Copy link
Collaborator

tscrim commented Jan 18, 2019

comment:10

If you rebase the branch, I will review this.

@fchapoton
Copy link
Contributor

comment:11

red branch => needs work

@mkoeppe mkoeppe removed this from the sage-8.2 milestone Dec 29, 2022
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