Hi William On Wed, Sep 02, 2009 at 11:18:40PM -0700, William Stein wrote: > If you take any integer (or rational) alpha such that alpha is not a > perfect square, and try to compute sqrt(alpha), Sage promotes alpha to the > symbolic ring (SR) and takes the square root there. Thus the first is > correct, since sqrt(-1) is not in ZZ, so the square root is instead taken > in the symbolic ring, which yields I.
OK > In the second case, the expression z=1.+sqrt(-1.) is in the complex real > field with 53 bits precision. The *base ring* of that field is the real > field with 53 bits precision. Maybe you were instead thinking about the > parent of z? Thanks sage: z=1.+sqrt(-1); print z; z.parent() 1.00000000000000 + 1.00000000000000*I Symbolic Ring sage: z=1.+sqrt(-1.); print z; z.parent() 1.00000000000000 + 1.00000000000000*I Complex Field with 53 bits of precision sage: regards, Jan -- .~. /V\ Jan Groenewald /( )\ www.aims.ac.za ^^-^^ --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---