[sage-support] Re: Maxima not able to multiply functions with complex numbers

2009-03-11 Thread Robert Bradshaw
On Mar 11, 2009, at 4:56 AM, Mani chandra wrote: > > Hi, > > The following function gives me an error. > > def test(l, r): >return complex(0, 1)**l*spherical_bessel_J(l, r) [...] > > TypeError: unsupported operand parent(s) for '*': ' 'complex'>' and > 'Symbolic Ring' > >

[sage-support] Re: Maxima not able to multiply functions with complex numbers

2009-03-11 Thread Carl Witty
On Mar 11, 10:47 am, Mani chandra wrote: > Also I tried some basic stuff with "I" and it doesn't seem to be working. > > sage: exp(I).real > Sage prefers methods to properties: sage: exp(I).real() cos(1) Using z = exp(I*r*cos(theta)).real() makes your parametric_plot3d work, too. Carl --~

[sage-support] Re: Maxima not able to multiply functions with complex numbers

2009-03-11 Thread Mani chandra
Simon King wrote: > Dear Mani chandra, > > something really weird seems to be going on. This is a fresh session > of Sage 3.3: > > sage: complex(0,1)*spherical_bessel_J(1,1) > --- > TypeError Tr

[sage-support] Re: Maxima not able to multiply functions with complex numbers

2009-03-11 Thread Simon King
Dear Mani chandra, something really weird seems to be going on. This is a fresh session of Sage 3.3: sage: complex(0,1)*spherical_bessel_J(1,1) --- TypeError Traceback (most recent call last)