Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#6144 closed defect (fixed)

[with patch, positive review] Pynac doesn't simplify exp(x)*exp(2*x) to exp(3*x)

Reported by: Mike Hansen Owned by:
Priority: major Milestone: sage-4.0.1
Component: symbolics Keywords:
Cc: William Stein Merged in: 4.0.1.rc2
Authors: Burcin Erocal, Mike Hansen Reviewers: Nick Alexander, Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: exp(x)*exp(2*x)
e^(2*x)*e^x

Attachments (3)

trac_6144-exp_simplify.patch (2.2 KB) - added by Burcin Erocal 14 years ago.
trac_6144-pynac_depends.patch (1.9 KB) - added by Burcin Erocal 14 years ago.
trac_6144-review.patch (609 bytes) - added by Mike Hansen 14 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 14 years ago by Burcin Erocal

GiNaC doesn't do this either:

> exp(x)*exp(2*x);
exp(2*x)*exp(x)

I'll try to play with the mul::eval method in pynac to do this. The main problem is doing it without compromising speed.

Cheers,

Burcin

Changed 14 years ago by Burcin Erocal

Changed 14 years ago by Burcin Erocal

comment:2 Changed 14 years ago by Burcin Erocal

Cc: William Stein added
Summary: Pynac doesn't simplify exp(x)*exp(2*x) to exp(3*x)[with patch, needs review] Pynac doesn't simplify exp(x)*exp(2*x) to exp(3*x)

New pynac package here fixes the exp simplification:

http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.8.spkg

Attached patches fix doctests, and change module_list.py to rebuild the sage/symbolic/* modules if the package is updated.

This package also contains a fix for #6163, so these tickets should be merged together.

Changed 14 years ago by Mike Hansen

Attachment: trac_6144-review.patch added

comment:3 Changed 14 years ago by Mike Hansen

Burcin's changes look good to me. There was one doctest failure that I fixed and put in trac_6144-review.patch

comment:4 Changed 14 years ago by ncalexan

Summary: [with patch, needs review] Pynac doesn't simplify exp(x)*exp(2*x) to exp(3*x)[with patch, positive review] Pynac doesn't simplify exp(x)*exp(2*x) to exp(3*x)

All looks good to me! I'm glad this is fixed, I updated the number field tests and was disappointed with the previous behaviour.

comment:5 Changed 14 years ago by Mike Hansen

Resolution: fixed
Status: newclosed

Merged in 4.0.1.rc2.

comment:6 Changed 14 years ago by Mike Hansen

Authors: Burcin Erocal, Mike Hansen
Merged in: 4.0.1.rc2
Reviewers: Nick Alexander, Mike Hansen
Note: See TracTickets for help on using tickets.