<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Random Numbers and NTL</title>
	<atom:link href="http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/feed/" rel="self" type="application/rss+xml" />
	<link>http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/</link>
	<description>the blog of ryan lewis</description>
	<lastBuildDate>Mon, 23 Jan 2012 20:31:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: bal</title>
		<link>http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/comment-page-1/#comment-3512</link>
		<dc:creator>bal</dc:creator>
		<pubDate>Thu, 07 Jan 2010 00:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://thecosmotron.com/?p=68#comment-3512</guid>
		<description>that should be include time.h</description>
		<content:encoded><![CDATA[<p>that should be include time.h</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bal</title>
		<link>http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/comment-page-1/#comment-3511</link>
		<dc:creator>bal</dc:creator>
		<pubDate>Thu, 07 Jan 2010 00:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://thecosmotron.com/?p=68#comment-3511</guid>
		<description>#include 

SetSeed(to_ZZ(clock()));</description>
		<content:encoded><![CDATA[<p>#include </p>
<p>SetSeed(to_ZZ(clock()));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Lewis</title>
		<link>http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/comment-page-1/#comment-348</link>
		<dc:creator>Ryan Lewis</dc:creator>
		<pubDate>Tue, 09 Dec 2008 05:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://thecosmotron.com/?p=68#comment-348</guid>
		<description>Cool!  I knew there had to be an easier way, thanks for replying!</description>
		<content:encoded><![CDATA[<p>Cool!  I knew there had to be an easier way, thanks for replying!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff W</title>
		<link>http://thecosmotron.com/2008/12/04/random-numbers-and-ntl/comment-page-1/#comment-347</link>
		<dc:creator>Jeff W</dc:creator>
		<pubDate>Tue, 09 Dec 2008 03:03:04 +0000</pubDate>
		<guid isPermaLink="false">http://thecosmotron.com/?p=68#comment-347</guid>
		<description>Ryan,

I used random ZZ&#039;s pretty extensively in the code for my honors thesis. Looking back at the code I see that all I did was this:

srand ( time(NULL) );
SetSeed( to_ZZ(rand()) );

Then to get a random ZZ, I called:

ZZ x = RandomBnd(N);

which gives you 0 &lt;= x &lt;= N. Perhaps this isn&#039;t the &quot;most secure&quot; or &quot;random&quot; way to do it, but it&#039;s definitely easier and shorter. 

Good luck!
Jeff</description>
		<content:encoded><![CDATA[<p>Ryan,</p>
<p>I used random ZZ&#8217;s pretty extensively in the code for my honors thesis. Looking back at the code I see that all I did was this:</p>
<p>srand ( time(NULL) );<br />
SetSeed( to_ZZ(rand()) );</p>
<p>Then to get a random ZZ, I called:</p>
<p>ZZ x = RandomBnd(N);</p>
<p>which gives you 0 &lt;= x &lt;= N. Perhaps this isn&#8217;t the &#8220;most secure&#8221; or &#8220;random&#8221; way to do it, but it&#8217;s definitely easier and shorter. </p>
<p>Good luck!<br />
Jeff</p>
]]></content:encoded>
	</item>
</channel>
</rss>

