Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6948 closed defect (fixed)

[with patch, positive review] powers of exp are over simplified

Reported by: burcin Owned by: burcin
Priority: critical Milestone: sage-4.1.2
Component: symbolics Keywords:
Cc: Merged in: Sage 4.1.2.alpha4
Authors: Burcin Erocal Reviewers: Karl-Dieter Crisman
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Francois Maltey wrote on sage-support:

var("a,b,c")
exp(a)^2 # returns exp(2a) is right
exp(a)^(1/2) # returns exp (a/2) is wrong, with a=2*i*pi we get -1=1
exp(a)^b # returns exp(a*b) is wrong

The thread is here:

http://groups.google.com/group/sage-support/browse_thread/thread/330a015bf640a4f3/0ddfdd5a4e021579

Attachments (2)

trac_6948-exp_power.patch (7.5 KB) - added by burcin 13 years ago.
trac_6948-exp_power_print.patch (750 bytes) - added by burcin 13 years ago.

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by burcin

comment:1 Changed 13 years ago by burcin

  • Authors set to Burcin Erocal
  • Status changed from new to assigned
  • Summary changed from powers of exp are over simplified to [with patch, waiting for new pynac] powers of exp are over simplified

This is fixed in my pynac tree, attachment:trac_6948-exp_power.patch is the corresponding patch for Sage. I will release a pynac spkg with some more fixes and post instructions for review.

comment:2 Changed 13 years ago by burcin

  • Summary changed from [with patch, waiting for new pynac] powers of exp are over simplified to [with patch, needs review] powers of exp are over simplified

New pynac package available at #6993.

comment:3 Changed 13 years ago by kcrisman

  • Summary changed from [with patch, needs review] powers of exp are over simplified to [with patch, needs work] powers of exp are over simplified

Nice, but does it actually fix the examples provided?

sage: exp(a)^(1/2)
sqrt(e^a)

I guess that's okay. But

sage: exp(a)^(1/3)
e^a^(1/3)
sage: exp(a^(1/3))
e^(a^(1/3))

I think there are missing parentheses in the first example, particularly because it's not typeset. Even if that is a convention, which I'm not so sure of, the dictum is that it's better to be explicit.

I also get a doctest failure (not mentioned in the Pynac upgrade ticket) in product and quotient rule differentiation in calculus/tests.py, but it looks like that's the one in #6524, so it's properly speaking another issue, I guess.

comment:4 Changed 13 years ago by burcin

  • Summary changed from [with patch, needs work] powers of exp are over simplified to [with patch, needs review] powers of exp are over simplified

This package should fix this problem:

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

I'll attach a patch with some more doctests now.

Changed 13 years ago by burcin

comment:5 Changed 13 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Summary changed from [with patch, needs review] powers of exp are over simplified to [with patch, positive review] powers of exp are over simplified

Positive review!

comment:6 Changed 13 years ago by mvngu

  • Merged in set to Sage 4.1.2.alpha3
  • Resolution set to fixed
  • Status changed from assigned to closed

Merged both patches.

comment:7 Changed 13 years ago by mvngu

  • Merged in changed from Sage 4.1.2.alpha3 to Sage 4.1.2.alpha4

There is no 4.1.2.alpha3. Sage 4.1.2.alpha3 was William Stein's release for working on making the notebook a standalone package.

Note: See TracTickets for help on using tickets.