Yep, looking at Integer.__pow__

   def __pow__(self, n, modulus):
        if modulus is not None:
            from sage.rings.finite_rings.integer_mod import Mod
            return Mod(self, modulus) ** n

so that should be exactly the same thing.

On Thu, Mar 17, 2011 at 10:26 AM, Graham Enos <graham.e...@gmail.com> wrote:
> Another option is to use the pow() function, as in pow(a, b, c).
>
> On Mar 17, 1:58 am, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> mod(a, c)^b
>>
>> On Wed, Mar 16, 2011 at 10:44 PM, Santanu Sarkar
>>
>>
>>
>>
>>
>>
>>
>> <sarkar.santanu....@gmail.com> wrote:
>> > How one can calculate  a^b mod c  in Sage for large b?
>>
>> > --
>> > To post to this group, send email to sage-support@googlegroups.com
>> > To unsubscribe from this group, send email to 
>> > sage-support+unsubscr...@googlegroups.com
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/sage-support
>> > URL:http://www.sagemath.org
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to 
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

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

Reply via email to