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
--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
On Tue, 7 Jun 2011 12:17:58 -0700 (PDT)
Samuel Lelievre samuel.lelie...@gmail.com 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
2011-06-07 Burcin Erocal:
On Tue, 7 Jun 2011, Samuel 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 +
2011/6/7 slelievre:
2011-06-07 Burcin Erocal:
On Tue, 7 Jun 2011, Samuel 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: