Opened 5 years ago
Closed 4 years ago
#24883 closed defect (fixed)
Endless symbolic computation
Reported by:  Irene Pasquinelli  Owned by:  

Priority:  major  Milestone:  sage8.4 
Component:  symbolics  Keywords:  days93, days94 
Cc:  Ralf Stephan, Vincent Delecroix  Merged in:  
Authors:  Irene Pasquinelli  Reviewers:  Ralf Stephan, Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  4d0c51e (Commits, GitHub, GitLab)  Commit:  4d0c51eab2f477499b6f7c64b5e7d179f8063cf2 
Dependencies:  #24838  Stopgaps: 
Description (last modified by )
I tried calculating
a=e^(I*pi/4)+1 b=1e^(I*pi/4) a*b
and both expressions a*b and a/b don't stop computing.
I tried both on sage8.1 for Windows and on sage8.2.beta6 on Ubuntu (native Ubuntu desktop on Windows10).
Change History (23)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Alternative computation that terminates:
UCF = UniversalCyclotomicField() a = UCF.zeta(8) + 1 b = 1  UCF.zeta(8) a * b
comment:3 Changed 5 years ago by
Description:  modified (diff) 

comment:4 Changed 5 years ago by
I can confirm it on archlinux with compiled sage8.2.beta6, sage8.2.beta5 and sage8.1. However, with the sagemath 8.111 from the archlinux community repository it does work.
sage: a = 1 + e^(I*pi/4) sage: b = 1  e^(I*pi/4) sage: a*b 1/4*((I + 1)*sqrt(2)  2)*((I + 1)*sqrt(2)  2) sage: a/b 1/2*((I + 1)*sqrt(2)  2)/((1/2*I + 1/2)*sqrt(2) + 1)
comment:6 followup: 7 Changed 5 years ago by
Actually there were changes in pynac0.7.17 that appear to have fixed it. With #24838:
sage: sage: a = 1 + e^(I*pi/4) ....: sage: b = 1  e^(I*pi/4) ....: sage: a*b ....: 1/4*((I + 1)*sqrt(2)  2)*((I + 1)*sqrt(2)  2)
We might doctest this in this ticket, though.
comment:7 Changed 5 years ago by
comment:8 Changed 5 years ago by
Authors:  → Irene Pasquinelli 

Ralf, Irene is working on this ticket (she is learning how to develop). We will have a branch in a minute. Thanks for pointing #24838.
comment:9 Changed 5 years ago by
Branch:  → u/ipasquinelli/24883 

Commit:  → efe5f145b805b60d72a12eaf9c57a5109e0c786a 
Status:  new → needs_review 
comment:10 Changed 5 years ago by
Dependencies:  → #24838 

comment:11 Changed 5 years ago by
Reviewers:  → Ralf Stephan 

I think this is fine, but we may have to wait for setting positive until #24838 gets positive.
comment:12 Changed 4 years ago by
Branch:  u/ipasquinelli/24883 → public/24883 

comment:13 Changed 4 years ago by
Commit:  efe5f145b805b60d72a12eaf9c57a5109e0c786a → 699c0a2215c0b2472a70170b89947d28021deb05 

comment:14 Changed 4 years ago by
Keywords:  days94 added 

Milestone:  sage8.2 → sage8.3 
Reviewers:  Ralf Stephan → Ralf Stephan, Travis Scrimshaw 
Status:  needs_review → positive_review 
LGTM.
comment:16 Changed 4 years ago by
Problem actually comes from an earlier doctest:
sage: e = x+1 <= x2
(I tested this by copy/pasting the doctest).
So we probably need to use exp
.
comment:17 Changed 4 years ago by
Commit:  699c0a2215c0b2472a70170b89947d28021deb05 → cb24f9a42dbddb869f40479b513e21c52d1200ae 

Branch pushed to git repo; I updated commit sha1. New commits:
cb24f9a  24883: improve usage of ambigous symbol in doctest

comment:18 Changed 4 years ago by
Status:  needs_work → needs_review 

comment:21 followup: 22 Changed 4 years ago by
Commit:  cb24f9a42dbddb869f40479b513e21c52d1200ae → 4d0c51eab2f477499b6f7c64b5e7d179f8063cf2 

Status:  positive_review → needs_review 
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
4d0c51e  Merge with sage8.3

comment:22 Changed 4 years ago by
Status:  needs_review → positive_review 

comment:23 Changed 4 years ago by
Branch:  public/24883 → 4d0c51eab2f477499b6f7c64b5e7d179f8063cf2 

Resolution:  → fixed 
Status:  positive_review → closed 
Could you add your architecture/sage version in the ticket description? I can confirm the behavior on archlinux with compiled sage8.2.beta6.