Opened 4 years ago
Last modified 10 days ago
#23304 new defect
hold=True does not always prevent evaluation
Reported by: | mmezzarobba | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.4 |
Component: | symbolics | Keywords: | |
Cc: | slelievre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #10035 | Stopgaps: |
Description (last modified by )
sage: x = SR.var(x) sage: x + 1/3 x + 1/3 sage: (x + 1/3).power(2, hold=True) (x + 1/3)^2 sage: (x + 1/3).power(2, hold=True).mul(2, hold=True) # <<< evaluates! 2*(1/9*(3*x + 1)^2) sage: (x + 1/3).mul(2, hold=True) 2*(x + 1/3)
Reported as https://github.com/pynac/pynac/issues/262
Change History (5)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
- Description modified (diff)
- Milestone changed from sage-8.0 to sage-8.1
- Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.
comment:3 Changed 4 years ago by
- Dependencies set to #10035
- Milestone changed from sage-8.1 to sage-8.2
- Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, in a later stable release.
Operations like this are now better done in a hold context. With #10035:
sage: hold.start() sage: x + 1/3 x + 1/3 sage: (x + 1/3)^2 (x + 1/3)^2 sage: (x + 1/3)^2*2 2*(x + 1/3)^2 sage: (x + 1/3)*2 2*(x + 1/3)
comment:4 Changed 7 months ago by
- Cc slelievre added
- Milestone changed from sage-8.2 to sage-9.3
The upstream fix in Pynac was merged in Pynac 0.7.11.
The upgrade to Pynac 0.7.11 was done in #23820, merged in Sage 8.1.beta6.
In the present ticket we should add a doctest.
comment:5 Changed 10 days ago by
- Milestone changed from sage-9.3 to sage-9.4
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review.
Note: See
TracTickets for help on using
tickets.
See also #21754 and #21758.