<?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: Next Prime in C</title>
	<atom:link href="http://involution.com/2007/07/09/next-prime-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://involution.com/2007/07/09/next-prime-in-c/</link>
	<description>Tony Perrie&#039;s Weblog</description>
	<lastBuildDate>Tue, 15 May 2012 22:43:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: cans in a bag</title>
		<link>http://involution.com/2007/07/09/next-prime-in-c/comment-page-1/#comment-23299</link>
		<dc:creator>cans in a bag</dc:creator>
		<pubDate>Sat, 14 Jul 2007 06:16:31 +0000</pubDate>
		<guid isPermaLink="false">http://involution.com/2007/07/09/next-prime-in-c/#comment-23299</guid>
		<description>MATH!</description>
		<content:encoded><![CDATA[<p>MATH!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://involution.com/2007/07/09/next-prime-in-c/comment-page-1/#comment-23165</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Tue, 10 Jul 2007 18:53:12 +0000</pubDate>
		<guid isPermaLink="false">http://involution.com/2007/07/09/next-prime-in-c/#comment-23165</guid>
		<description>You don&#039;t need to return 7 because it&#039;s in the right mod 6 row.  Also, the compares are just checking for divisibility outside of the mod 6 rows.  So, it&#039;s more efficient to do that than to actually run through every divisor.  </description>
		<content:encoded><![CDATA[<p>You don&#8217;t need to return 7 because it&#8217;s in the right mod 6 row.  Also, the compares are just checking for divisibility outside of the mod 6 rows.  So, it&#8217;s more efficient to do that than to actually run through every divisor.  </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://involution.com/2007/07/09/next-prime-in-c/comment-page-1/#comment-23164</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 10 Jul 2007 18:45:37 +0000</pubDate>
		<guid isPermaLink="false">http://involution.com/2007/07/09/next-prime-in-c/#comment-23164</guid>
		<description>Ummm wordpress sucks.  Reposting without a less than sign:

I haven&#039;t thought much about this whole mod-6 thing and how much it buys you, but the beginning of the function is sloppy.  You check for n&lt;7 but then you don&#039;t handle the default case.  You need a &quot;return 7&quot; in that block.

I still maintain that you should not calculate that sqrt more than once.   Even if it&#039;s not proven that there&#039;s a prime between every two squares, you can calculate max_divisor once, keep track of when you exceed max_divisor^2, and increment it at that point.

As a side note, I wonder if there&#039;s a special function to only calculate the floor of the sqrt .  that would be pretty easy to write, and really useful for situations like this where you don&#039;t care</description>
		<content:encoded><![CDATA[<p>Ummm wordpress sucks.  Reposting without a less than sign:</p>
<p>I haven&#8217;t thought much about this whole mod-6 thing and how much it buys you, but the beginning of the function is sloppy.  You check for n&lt;7 but then you don&#8217;t handle the default case.  You need a &#8220;return 7&#8243; in that block.</p>
<p>I still maintain that you should not calculate that sqrt more than once.   Even if it&#8217;s not proven that there&#8217;s a prime between every two squares, you can calculate max_divisor once, keep track of when you exceed max_divisor^2, and increment it at that point.</p>
<p>As a side note, I wonder if there&#8217;s a special function to only calculate the floor of the sqrt .  that would be pretty easy to write, and really useful for situations like this where you don&#8217;t care</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://involution.com/2007/07/09/next-prime-in-c/comment-page-1/#comment-23163</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 10 Jul 2007 18:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://involution.com/2007/07/09/next-prime-in-c/#comment-23163</guid>
		<description>I haven&#039;t thought much about this whole mod-6 thing and how much it buys you, but the beginning of the function is sloppy.  You check for n</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t thought much about this whole mod-6 thing and how much it buys you, but the beginning of the function is sloppy.  You check for n</p>
]]></content:encoded>
	</item>
</channel>
</rss>

