-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Fix subs failure involving integer-valued rational exponents #31137
Comments
comment:1
Seems to have a lot to do with I also got a crash when interrupting the computation:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:2
Seems expressions resulting from |
Changed keywords from none to factor |
comment:3
What seemed to be hanging was just taking a long time.
|
Branch: public/31137 |
Dependencies: #30786 |
Author: Dave Morris |
Commit: |
comment:6
only the patch for expression.pyx is needed here, with the rest in #30446 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:8
LGTM |
Reviewer: Dima Pasechnik |
comment:9
Can we improve the ticket summary and ticket description? |
comment:10
it just adds an extra doctest, which used to fail before #30446 |
This comment has been minimized.
This comment has been minimized.
comment:12
Thanks for the explanation. |
This comment has been minimized.
This comment has been minimized.
Changed branch from public/31137 to |
From Ask Sage question 54986:
subs
fails with a memory error (or doesn't return) on some expressions.The following works fine:
These expressions have the same string representation:
Substituting
f = 2*beta
inR1
R2
R3
works:However, the following never return:
Attempting to interrupt the last call can result in a Sage crash;
the original poster reports a "Memory Error" exception.
As a comparison, substituting in
R3
via SymPy works:but seems to fail via Mathematica somehow:
Priority set to critical, because it affects a very basic feature of Sage.
RESOLUTION: solved by the patch to pynac in #30446. There was a bug in evaluating an expression (perhaps
sqrt(expr.real())^2
) that has a rational exponent (such as2/2
) that simplifies to an integer. This ticket just adds a doctest to ensure that the problem is not allowed to return.Depends on #30786
Depends on #30446
CC: @slel
Component: symbolics
Keywords: factor
Author: Dave Morris
Branch/Commit:
c2b45c0
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/31137
The text was updated successfully, but these errors were encountered: