Opened 5 years ago

Closed 5 years ago

#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 Merged in: 4.0.2.alpha0
Authors: Burcin Erocal Reviewers: Nick Alexander
Report Upstream: Work issues:
Branch: Commit:
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 (1)

trac_6256-pynac_mul_compare_tests.patch (669 bytes) - added by burcin 5 years ago.
doctests

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by burcin

  • Status changed from new to assigned

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.

Changed 5 years ago by burcin

doctests

comment:2 Changed 5 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 5 years ago by ncalexan

  • Authors set to Burcin Erocal
  • Merged in set to 4.0.2.alpha0
  • Resolution set to fixed
  • Reviewers set to Nick Alexander
  • Status changed from assigned to closed
  • 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

Fine by me, works with new spkg.

Note: See TracTickets for help on using tickets.