<div dir="ltr">Haskell also includes the primality testing functions of the GMP library on Integers, but they're MagicHashed for some reason so handle with care:<div><br></div><div><a href="https://hackage.haskell.org/package/integer-gmp-1.0.0.0/docs/GHC-Integer-GMP-Internals.html#g:12">https://hackage.haskell.org/package/integer-gmp-1.0.0.0/docs/GHC-Integer-GMP-Internals.html#g:12</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 24, 2015 at 6:38 AM, William Yager <span dir="ltr"><<a href="mailto:will.yager@gmail.com" target="_blank">will.yager@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">See section 4.4. <a href="http://cacr.uwaterloo.ca/hac/about/chap4.pdf" target="_blank">http://cacr.uwaterloo.ca/hac/about/chap4.pdf</a><div><br></div><div>--Will Yager</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Aug 24, 2015 at 12:34 AM, Christopher Howard <span dir="ltr"><<a href="mailto:ch.howard@zoho.com" target="_blank">ch.howard@zoho.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi. I was working through a math chapter explaining the RSA algorithm,<br>
and I was implementing it in Haskell for learning sake. However, the<br>
chapter does not explain how you efficiently pick the two prime<br>
numbers. I scanned through the WP page on primality tests but it was<br>
somewhat overwhelming. What would be the standard primality test for<br>
this sort of application, and is it already built in to Base somewhere?<br>
<span><font color="#888888"><br>
--<br>
Biblical creationism: <a href="http://tinyurl.com/qfyeg4a" rel="noreferrer" target="_blank">http://tinyurl.com/qfyeg4a</a><br>
Free Bible software: <a href="http://xiphos.org" rel="noreferrer" target="_blank">http://xiphos.org</a><br>
Software freedom: <a href="http://tinyurl.com/qjnpnsm" rel="noreferrer" target="_blank">http://tinyurl.com/qjnpnsm</a><br>
Free computer operating system: <a href="http://tinyurl.com/7wczchu" rel="noreferrer" target="_blank">http://tinyurl.com/7wczchu</a><br>
Alternative to MS Office: <a href="http://tinyurl.com/aw9p6d4" rel="noreferrer" target="_blank">http://tinyurl.com/aw9p6d4</a><br>
</font></span><br></div></div>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>