Jump to content

Miller–Rabin primality test: Difference between revisions

m
(Adding a Standard ML version, based on my Scheme solution to SICP ex. 1.28.)
Line 1,468:
 
=={{header|Standard ML}}==
 
FIXME: This needs to use LargeInt type.
 
<lang sml>
Line 1,498 ⟶ 1,500:
trylist "test some known primes" [7369, 7393, 7411, 27367, 27397, 27407];
 
</lang>
(*** sample run:
 
Sample run:
 
<pre>
Standard ML of New Jersey v110.72 [built: Sun Nov 6 21:16:05 2011]
[opening 1-28.sml]
Line 1,518 ⟶ 1,524:
[(7369,true),(7393,true),(7411,true),(27367,true),(27397,true),
(27407,true)]) : string * (int * bool) list
</pre>
 
***)
</lang>
 
=={{header|Tcl}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.