On Nov 6, 9:07 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote:
> I'm not sure how to covert those sqrt expressions into what you want.
> However, you can see that they are what you're expecting:
>
> sage: A = matrix([[-1,-1+I],[1,0]])
> sage: evs = A.eigenvalues(); evs
> [(-sqrt(4*I - 3) - 1)/2, (sqrt(4*I - 3) - 1)/2]
> sage: map(CC, evs)
> [-1.00000000000000 - 1.00000000000000*I, 1.00000000000000*I]

or

sage: [x.n() for x in evs]
[-1.00000000000000 - 1.00000000000000*I, 1.00000000000000*I]

or (since .n() has many synonyms)

sage: N(evs[0])
-1.00000000000000 - 1.00000000000000*I

(Note that (1+2i)^2 = -3 + 4i, so your expressions are (-1 +/- (1+2i))/
2, which gives the numbers you want.)

  John


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to