Skip to content

Commit a2fa24d

Browse files
authored
typo.
1 parent 0094739 commit a2fa24d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Miller-Rabin Primality Test/README.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ In 1976, Gray Miller introduced an algorithm, through his ph.d thesis[1], which
66

77
The result of the test is simply a boolean. However, `true` does not implicate _the number is prime_. In fact, it means _the number is **probably** prime_. But `false` does mean _the number is composite_.
88

9-
In order to increase the accuracy of the test, it needs to be iterated few times. If it returns `true` in every single iteration, than we can say with confidence that _the number is pro......bably prime_.
9+
In order to increase the accuracy of the test, it needs to be iterated few times. If it returns `true` in every single iteration, then we can say with confidence that _the number is pro......bably prime_.
1010

1111
## Algorithm
1212

13-
Let `n` be the given number, and write `n-1` as `2^s·d`, where d is odd. And choose a random number `a` within the range from `2` to `n - 1`.
13+
Let `n` be the given number, and write `n-1` as `2^s·d`, where `d` is odd. And choose a random number `a` within the range from `2` to `n - 1`.
1414

1515
Now make a sequence, in modulo `n`, as following:
1616

@@ -28,7 +28,7 @@ The following pseudo code is excerpted from Wikipedia[3]:
2828

2929
```swift
3030
mrPrimalityTest(7) // test if 7 is prime. (default iteration = 1)
31-
mrPrimalityTest(7, iteration: 10) // test if 7 is prime & iterate 10 times.
31+
mrPrimalityTest(7, iteration: 10) // test if 7 is prime && iterate 10 times.
3232
```
3333

3434
## Reference

0 commit comments

Comments
 (0)