-
-
Notifications
You must be signed in to change notification settings - Fork 601
sage fails to factor some easy expressions #33640
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
Comments
comment:1
Here is a tentative diagnosis from a quick look at the code. It seems that sagemath expands the expression into a polynomial (a linear combination of powers of |
comment:2
Maybe a silly question, but I notice that
|
comment:3
[message deleted] |
comment:4
See also #32613 |
Branch: public/ticket/33640 |
comment:5
let us see if this little change breaks nothing New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
apparently, this works. I have added a doctest. It may have consequences on the speed, altough this is not clear. |
comment:8
This works. I spent a while trying to determine if there was a good reason the function to return false if ginac determines that the numerator and denominator are "trivial" (as was morally done before), but I really can't find one. I note that the boolean result of the changed function is also used in gamma_normalization, but this change seems to work well with that too. |
Reviewer: David Lowry-Duda |
comment:9
I think the point of checking the boolean value is that if a polynomial is irreducible, then it should be returned unchanged, instead of expanded. However, this doesn't seem to work:
It would be better to return |
comment:10
author name |
comment:11
Merge failure on top of: 381771d188 Trac #33636: replace loadable_module_extension() by importlib.machinery.EXTENSION_SUFFIXES 4c0f8481d2 Trac #33002: Method tikz of polyhedron class can now return an object of type TikzPicture c744d7c Trac #29097: build/make/Makefile.in: Rename make targets SPKG-clean to SPKG-uninstall 8312ee1 Trac #33530: Upgrade ipython to 8.x 067a66c Trac #33428: prompt_toolkit 3.0.25+ breaks Ctrl-C 79ed9e5 Trac #33160: update Singular to 4.3.1 4cc4817 Trac #32088: gfan testsuite hangs on 32bit 10247d5 Trac #31049: "setup.py develop" rewrites the installed sage-version.sh as if it is a Python script 7f71494 Updated SageMath version to 9.7.beta6 author '' does not look right |
Author: Frédéric Chapoton |
comment:13
so, please give us again a positive review ! |
comment:14
I'm marking this as positive again. I don't know about the merge failure Volker mentioned, but if I recall correctly that is a separate issue. If I'm wrong, please let me know. |
Changed branch from public/ticket/33640 to |
As reported on sage-devel, sage fails to factor expressions that expand to something very easy, such as
x^2
or0
. Instead, it returns the original expression.Component: symbolics
Keywords: factor, polynomial
Author: Frédéric Chapoton
Branch/Commit:
b41c93f
Reviewer: David Lowry-Duda
Issue created by migration from https://trac.sagemath.org/ticket/33640
The text was updated successfully, but these errors were encountered: