Re: Finding the remainder from very large division
- From: Phil Carmody <thefatphil_demunged@xxxxxxxxxxx>
- Date: 29 Nov 2007 02:30:18 +0200
rob@xxxxxxxxxxxxxx (Rob Johnson) writes:
In article <fikhk6$4qj$1@xxxxxxxxxxxxxxxxxxxxxxxxxx>,....
Dave Seaman <dseaman@xxxxxxxxxxxx> wrote:
On Wed, 28 Nov 2007 11:44:14 -0800 (PST), marksmith@xxxxxxxxxxxxxxxxx wrote:
I am trying to use Fermats Theorem to find: 3^201 mod 11
The Mathematica command for this is:
In[1]:= PowerMod[3,201,11]
Out[1]= 3
Or simply use bc from the Terminal and enter
(3^201)%11
Bletch. Large intermediate value. dc's a much better fit:
3 201 11|p
Test bc's ``3^20000001%11'' against dc's
``3 20000001 11|p'' for a clearer example of why you don't
want to create unnecessarily large intermediates.
Phil
--
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration
.
- References:
- Finding the remainder from very large division
- From: marksmith
- Re: Finding the remainder from very large division
- From: Dave Seaman
- Re: Finding the remainder from very large division
- From: Rob Johnson
- Finding the remainder from very large division
- Prev by Date: Re: Positive/Negative after taking the square root
- Next by Date: Re: R^R = R^2 = R
- Previous by thread: Re: Finding the remainder from very large division
- Next by thread: Re: Finding the remainder from very large division
- Index(es):