On Tue, 7 Jun 2011 12:17:58 -0700 (PDT)
Samuel Lelievre <[email protected]> wrote:

> Can we not use + to add complex numbers?
> 
> sage: j = -1/2 + sqrt(3)/2*i
> sage: a = -2*j*j
> sage: b = -j/2
> sage: print a.real(); print b.real(); print (a+b).real()
> 1
> 1/4
>  + 1/4

With Sage 4.7.alpha1, I get:

sage: sage: j = -1/2 + sqrt(3)/2*i
sage: sage: a = -2*j*j
sage: sage: b = -j/2
sage: sage: print a.real(); print b.real(); print (a+b).real()
1
1/4
5/4


Which version are you using?


Cheers,
Burcin

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to