On Dec 4, 2008, at 4:50 PM, William Stein wrote:

In case my response above was ambiguous, I'm very much in favor of their being a way to change how the symbolic I prints. Wait a minute, I just realized that I designed and imlemented a very nice way to do this sort of thing over THREE YEARS ago, but nobody ever seemed to use it. Check this, which has
worked (more generically) since Sage-1.0:

sage: I.rename('_j')
sage: I
_j
sage: expand((1+i)^2)
2*_j
sage: expand((2+3*i)^2)
12*_j - 5

You can actually rename most anything that isn't defined by Cython code:

sage: f = sin(2*I) + cos(3*x); f
cos(3*x) + _j*sinh(2)
sage: f.rename('fred')
sage: f
fred


The only problem I see with this is that it doesn't free up the original. One reason for changing the symbolic I, is to be able to use it for other variables.

Cheers,

Tim.

---
Tim Lahey
PhD Candidate, Systems Design Engineering
University of Waterloo
http://www.linkedin.com/in/timlahey

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to