Ticket #6256 (closed defect: fixed)
[with patch and package, positive review] bug in symbolic arithmetic with exp
| Reported by: | burcin | Owned by: | burcin |
|---|---|---|---|
| Priority: | blocker | Milestone: | sage-4.0.2 |
| Component: | symbolics | Keywords: | |
| Cc: | jason | Work issues: | |
| Report Upstream: | Reviewers: | Nick Alexander | |
| Authors: | Burcin Erocal | Merged in: | 4.0.2.alpha0 |
| Dependencies: | Stopgaps: |
Description
sage: var('kappa')
kappa
sage: x = sqrt(kappa)
sage: F = exp(x)
sage: F
e^sqrt(kappa)
sage: F/F
e^(2*sqrt(kappa))
sage: 1/F
e^(-sqrt(kappa))
sage: (1/F) * F
e^(2*sqrt(kappa))
Attachments
Change History
comment:2 Changed 4 years ago by burcin
- Cc jason added
- Summary changed from bug in symbolic arithmetic with exp to [with patch and package, needs review] bug in symbolic arithmetic with exp
New pynac package fixes this:
http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.8.p0.spkg
It also contains fixes for #6244 and #6211, so doctests should be run with patches from those tickets applied.
Jason, can you review this?
comment:3 Changed 4 years ago by ncalexan
- Status changed from assigned to closed
- Authors set to Burcin Erocal
- Summary changed from [with patch and package, needs review] bug in symbolic arithmetic with exp to [with patch and package, positive review] bug in symbolic arithmetic with exp
- Reviewers set to Nick Alexander
- Resolution set to fixed
- Merged in set to 4.0.2.alpha0
Fine by me, works with new spkg.
Note: See
TracTickets for help on using
tickets.


Here is the fix for pynac:
diff --git a/ginac/mul.cpp b/ginac/mul.cpp --- a/ginac/mul.cpp +++ b/ginac/mul.cpp @@ -1167,7 +1167,7 @@ if (cmpval != 0) { return cmpval; } - if (seq.size() == 1 && overall_coeff.is_equal(_ex_1)) + if (seq.size() == 1 && overall_coeff.is_equal(_ex1)) return 0; return 1; }I'll post an updated spkg later together with a fix for #6244.