Opened 2 years ago
Closed 21 months ago
#30786 closed defect (fixed)
Multiplying and dividing by 3 hangs
Reported by:  GMS  Owned by:  

Priority:  minor  Milestone:  sage9.3 
Component:  symbolics  Keywords:  
Cc:  Merged in:  
Authors:  Dave Morris  Reviewers:  Travis Scrimshaw, Dima Pasechnik 
Report Upstream:  N/A  Work issues:  
Branch:  6ee3113 (Commits, GitHub, GitLab)  Commit:  6ee3113a288a36519ed1a4b0adbd19250404874b 
Dependencies:  #30446  Stopgaps: 
Description
Tested with https://sagecell.sagemath.org
sage: version() 'SageMath version 9.1, Release Date: 20200520'
All of these work as expected:
sage: exp(ln(x)) sage: exp(3*ln(x)/3) sage: exp(ln(9*x))
However this hangs:
sage: exp(3*ln(9*x)/3)
In case you are curious, this is what I was doing (the expressions were a bit more complex, of course):
sage: a=var('a') sage: y=exp(3*x) sage: x0=ln(9*a)/3 sage: y(x=x0)
Change History (12)
comment:1 Changed 2 years ago by
comment:2 Changed 2 years ago by
DaveWitteMorris is correct. I checked and this is the same issue as #30446. If you look on that ticket, I submitted a pull request with pynac
that will fix the issue.
comment:3 Changed 2 years ago by
Thanks for the feedback, I was really surprised by this bug. Glad to know it will be fixed.
comment:4 Changed 23 months ago by
Component:  basic arithmetic → symbolics 

Dependencies:  → #30446 
Milestone:  sage9.1.1 → sage9.4 
Priority:  major → minor 
comment:5 Changed 23 months ago by
Branch:  → public/30786 

comment:6 Changed 23 months ago by
Authors:  → Dave Morris 

Commit:  → 4a5d0536a91fd3ef538c3430e3b668c75272225d 
Milestone:  sage9.4 → sage9.3 
Status:  new → needs_review 
The PR adds doctests for the bugs on this ticket, #28620, and #30304. All were fixed by the patch to pynac at #30446 (which has positive review). These doctests are in the _pow_
method, and I moved the doctest of #30446 to the same place. (It was in the _latex_
method, which does not seem like such a good place.)
New commits:
dc073df  fixes for trac #30446

4a5d053  doctests for trac 28620, 30304, 30786

comment:7 Changed 23 months ago by
Reviewers:  → Travis Scrimshaw 

Status:  needs_review → positive_review 
LGTM.
comment:10 Changed 22 months ago by
Commit:  4a5d0536a91fd3ef538c3430e3b668c75272225d → 6ee3113a288a36519ed1a4b0adbd19250404874b 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
9d747fc  sage package updatelatest: Distinguish pypi package name and spkg name

f74f66c  sage package updatelatest: Accept package classes :standard:, :optional: etc., restrict to normal Python packages

182b3d2  sage package fixchecksum: Handle package classes, ignore nonnormal packages

9a57cf6  pynac update

563940e  doctest from #30446

51def3c  sane version name

4834dc8  remove upstreamed patch

214712d  tarball update

6ee3113  doctests for trac 28620, 30304, 30786

comment:11 Changed 22 months ago by
Reviewers:  Travis Scrimshaw → Travis Scrimshaw, Dima Pasechnik 

Status:  needs_work → positive_review 
OK, done
comment:12 Changed 21 months ago by
Branch:  public/30786 → 6ee3113a288a36519ed1a4b0adbd19250404874b 

Resolution:  → fixed 
Status:  positive_review → closed 
I confirm that there is a problem.
CoCalc
ran out of memory. My laptop (9.2rc2 on MacOS 10.15.7) completed eventually (I think it took about half an hour). The output is a 4GB string of nonsense that seems to be almost entirely digits, but starts with1/34723950083
and ends with91987451449/x
.These symptoms are somewhat similar to #30446.