Miller–Rabin primality test: Difference between revisions

Content added Content deleted
(Adding a Rust entry to the Miller-Rabin primality test.)
m (→‎{{header|Rust}}: Added "rand" dependency to header comment.)
Line 4,284: Line 4,284:
=={{header|Rust}}==
=={{header|Rust}}==


<lang rust>/* Add this line to the [dependencies] section of your Cargo.toml file:
<lang rust>/* Add these lines to the [dependencies] section of your Cargo.toml file:
num = "0.2.0"
num = "0.2.0"
rand = "0.6.5"
*/
*/
Line 4,478: Line 4,479:
Q: Is 123123423467 prime? A: false
Q: Is 123123423467 prime? A: false
Q: Is 123123423469 prime? A: true</pre>
Q: Is 123123423469 prime? A: true</pre>



=={{header|Scala}}==
=={{header|Scala}}==