Interesting. Can you try the following (which actually does work for me):
---------------------------------------------------------------------- | Sage Version 4.0, Release Date: 2009-05-29 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: poly = x^2+x+1 sage: def myroots(p): ....: R = IntegerModRing(p) ....: RR.<t> = R[] ....: f = RR(poly(x=t)) ....: return f.roots(R) ....: sage: myroots(7) [(4, 1), (2, 1)] If this doesn't work for you, can you give more details (which version of Sage are you using, are you working in the command line or the notebook). Best, Alex On Sun, May 31, 2009 at 4:21 PM, wkehowski <wkehow...@cox.net> wrote: > > Thanks, but here is the error message: > > TypeError: polynomial must be over a field of characteristic 0. > > -- Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/ --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send 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 -~----------~----~----~----~------~----~------~--~---