Hi
On Dec 8, 2004, at 04:59 pm, McGehee, Robert wrote:
R users, I am having a problem with the modulus operator for large
numbers as follows,
a <- 2
n <- 561
## n is the first Carmichael number, so by Fermat's Little Theorem the
below should equal zero.
(a^(n-1) - 1) %% n
[1] 2.193172e+152
I don't
On Wed, 8 Dec 2004, McGehee, Robert wrote:
R users, I am having a problem with the modulus operator for large
numbers as follows,
a <- 2
n <- 561
## n is the first Carmichael number, so by Fermat's Little Theorem the
below should equal zero.
(a^(n-1) - 1) %% n
[1] 2.193172e+152
## Seems that R and
R users, I am having a problem with the modulus operator for large
numbers as follows,
a <- 2
n <- 561
## n is the first Carmichael number, so by Fermat's Little Theorem the
below should equal zero.
(a^(n-1) - 1) %% n
[1] 2.193172e+152
## Seems that R and Fermat disagree
## Also,
100