2010/1/27 Jaakko Seppälä <[email protected]>:
> True. I was just thinking that why Sage won't use the law of
> congruences to evaluate the expression. 84977118993*2^520+1 is not too
> large number to fit into the memory. Therefore one can use laws of
> congruences to evaluate mod(2^(2^517)+1,84977118993*2^520+1).

No.  This is would directly violate one of the most basic rules of how
the Python programming language works (that expressions are
evaluated), and make the whole language much, much harder to reason
and work with.
I'm very glad that Python doesn't do that.

 -- William

>
> On Jan 27, 5:21 pm, Marshall Hampton <[email protected]> wrote:
>> The _result_ can certainly be verified by Sage somehow.  But to
>> directly manipulate the expansion of something like 2^(2^517)+1 would
>> be impossible, so care is needed in how to represent it.  In base 10,
>> for example, that number has about 10^155 digits.  Given that there
>> are roughly 10^52 electrons in the earth, it would be hard to deal
>> with that.
>>
>> -M. Hampton
>>
>> On Jan 27, 5:14 am, Jaakko Seppälä <[email protected]> wrote:
>>
>> > I found onhttp://www.prothsearch.net/fermat.htmlthat84977118993*2^
>> > {520} + 1 | 2^{2^517}+1. Can this result be verified by Sage?
>>
>> > sage: mod(2^(2^517)+1,84977118993*2^520+1)
>> > ---------------------------------------------------------------------------
>> > RuntimeError                              Traceback (most recent call
>> > last)
>>
>> > /home/jaakko/Matikka/sage-4.2.1-linux-Ubuntu_9.10-i686-Linux/<ipython
>> > console> in <module>()
>>
>> > /home/jaakko/Matikka/sage-4.2.1-linux-Ubuntu_9.10-i686-Linux/local/lib/
>> > python2.6/site-packages/sage/rings/integer.so in
>> > sage.rings.integer.Integer.__pow__ (sage/rings/integer.c:12061)()
>>
>> > RuntimeError: exponent must be at most 2147483647
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to 
> [email protected]
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

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

Reply via email to