<?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: Project Euler in F# &#8211; Problem 45</title>
	<atom:link href="http://www.fsharp.it/2008/04/17/project-euler-in-f-problem-45/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fsharp.it/2008/04/17/project-euler-in-f-problem-45/</link>
	<description>Functional programming on .Net</description>
	<lastBuildDate>Wed, 18 Aug 2010 12:04:06 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: DFectuoso</title>
		<link>http://www.fsharp.it/2008/04/17/project-euler-in-f-problem-45/comment-page-1/#comment-2260</link>
		<dc:creator>DFectuoso</dc:creator>
		<pubDate>Thu, 05 Mar 2009 00:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=26#comment-2260</guid>
		<description>Thanks, the &quot;The solution to the problem is greater than I could imagine&quot; was they key i needed to find my error</description>
		<content:encoded><![CDATA[<p>Thanks, the &#8220;The solution to the problem is greater than I could imagine&#8221; was they key i needed to find my error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dennys</title>
		<link>http://www.fsharp.it/2008/04/17/project-euler-in-f-problem-45/comment-page-1/#comment-706</link>
		<dc:creator>dennys</dc:creator>
		<pubDate>Mon, 01 Sep 2008 20:21:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=26#comment-706</guid>
		<description>Good thingking, thanks for the hints. I&#039;m not like the idea that generate three large sequences. Your idea is much better. I&#039;m not use bignums, the solution is an integer of 32 bits. My C++ code:

[c++]
#define EPS 1e-10
#define MAX 100000

int hex(int n){ return (int) n*(2*n-1);}
bool is_pentagonal(int x){
        double _n;
        int n;
	_n = (sqrt(24.0*x + 1.0) + 1.0)/6.0;
	n = (int) _n;
	return (fabs(_n-(double)n)&lt;EPS);	
}
main(){
	int j, hexagonal;
	for(j=144;j%d\n&quot;,hexagonal);
			break;
		}
	}

}
[/c++]</description>
		<content:encoded><![CDATA[<p>Good thingking, thanks for the hints. I&#8217;m not like the idea that generate three large sequences. Your idea is much better. I&#8217;m not use bignums, the solution is an integer of 32 bits. My C++ code:</p>
<pre class="brush: c++">
#define EPS 1e-10
#define MAX 100000

int hex(int n){ return (int) n*(2*n-1);}
bool is_pentagonal(int x){
        double _n;
        int n;
	_n = (sqrt(24.0*x + 1.0) + 1.0)/6.0;
	n = (int) _n;
	return (fabs(_n-(double)n)&amp;lt;EPS);
}
main(){
	int j, hexagonal;
	for(j=144;j%d\n&quot;,hexagonal);
			break;
		}
	}

}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Smith</title>
		<link>http://www.fsharp.it/2008/04/17/project-euler-in-f-problem-45/comment-page-1/#comment-273</link>
		<dc:creator>Chris Smith</dc:creator>
		<pubDate>Tue, 22 Apr 2008 20:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=26#comment-273</guid>
		<description>I think this approach is great! I&#039;ve been working on Problem 45 myself using the &#039;generate three infinite sequences, and increment until they are all equal&#039; approach. However, as you discovered, the search space is a tad large...</description>
		<content:encoded><![CDATA[<p>I think this approach is great! I&#8217;ve been working on Problem 45 myself using the &#8216;generate three infinite sequences, and increment until they are all equal&#8217; approach. However, as you discovered, the search space is a tad large&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
