<?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 25</title>
	<atom:link href="http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/</link>
	<description>Functional programming on .Net</description>
	<lastBuildDate>Wed, 23 Mar 2011 17:29:06 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: 10 one-line solutions for project euler &#124; united-coders.com</title>
		<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/comment-page-1/#comment-16962</link>
		<dc:creator>10 one-line solutions for project euler &#124; united-coders.com</dc:creator>
		<pubDate>Wed, 29 Dec 2010 11:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=49#comment-16962</guid>
		<description>[...] found an one-liner on sharp.it in [...]</description>
		<content:encoded><![CDATA[<p>[...] found an one-liner on sharp.it in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/comment-page-1/#comment-11432</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Tue, 23 Feb 2010 22:18:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=49#comment-11432</guid>
		<description>Here&#039;s a one-liner version:

let euler25 = Seq.unfold (fun (n0, n1) -&gt; Some(n0, (n1, n0 + n1))) (0I,1I) &#124;&gt; Seq.takeWhile ((&gt;) (pown 10I 999)) &#124;&gt; Seq.length;;</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a one-liner version:</p>
<p>let euler25 = Seq.unfold (fun (n0, n1) -&gt; Some(n0, (n1, n0 + n1))) (0I,1I) |&gt; Seq.takeWhile ((&gt;) (pown 10I 999)) |&gt; Seq.length;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: claudio</title>
		<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/comment-page-1/#comment-831</link>
		<dc:creator>claudio</dc:creator>
		<pubDate>Fri, 03 Oct 2008 21:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=49#comment-831</guid>
		<description>You have to delete the second line, it was only required before the September CTP release.</description>
		<content:encoded><![CDATA[<p>You have to delete the second line, it was only required before the September CTP release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxwell</title>
		<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/comment-page-1/#comment-829</link>
		<dc:creator>Maxwell</dc:creator>
		<pubDate>Fri, 03 Oct 2008 18:15:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=49#comment-829</guid>
		<description>When I try to paste any of your programs into Visual Studio 2008 with the September CTP of F# (1.9.6.2), I get the following error for line 2:

Error 1
The namespace &#039;BigInt&#039; is not defined.
C:\Users\Owner\Documents\Visual Studio 2008\Projects\FSharp1\FSharp1\Program.fs
2
28
FSharp1Program.cs:
[fsharp]#light
open Microsoft.FSharp.Math.BigInt

let has1000Digits (n : Microsoft.FSharp.Math.BigInt) =
  n.ToString().Length = 1000

let euler25 =
  ((1I,1I) &#124;&gt; Seq.unfold
    (fun (n0, n1) -&gt;
      (if has1000Digits n0 then None
        else Some(n0, (n1, n0 + n1))))
    &#124;&gt; Seq.length) + 1
[/fsharp]</description>
		<content:encoded><![CDATA[<p>When I try to paste any of your programs into Visual Studio 2008 with the September CTP of F# (1.9.6.2), I get the following error for line 2:</p>
<p>Error 1<br />
The namespace &#8216;BigInt&#8217; is not defined.<br />
C:\Users\Owner\Documents\Visual Studio 2008\Projects\FSharp1\FSharp1\Program.fs<br />
2<br />
28<br />
FSharp1Program.cs:</p>
<pre class="brush: fsharp">#light
open Microsoft.FSharp.Math.BigInt

let has1000Digits (n : Microsoft.FSharp.Math.BigInt) =
  n.ToString().Length = 1000

let euler25 =
  ((1I,1I) |&gt; Seq.unfold
    (fun (n0, n1) -&gt;
      (if has1000Digits n0 then None
        else Some(n0, (n1, n0 + n1))))
    |&gt; Seq.length) + 1
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin</title>
		<link>http://www.fsharp.it/2008/09/19/project-euler-in-f-problem-25/comment-page-1/#comment-798</link>
		<dc:creator>Gavin</dc:creator>
		<pubDate>Sat, 20 Sep 2008 02:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.fsharp.it/?p=49#comment-798</guid>
		<description>A nicer way to check if a number has 1000 digits is:

[fsharp]
let has1000Digits n =
   let oneThousandDigits = (BigInt.pow 10I 999I) 
   n &gt;= oneThousandDigits
[/fsharp]

with this change it runs considerably faster.</description>
		<content:encoded><![CDATA[<p>A nicer way to check if a number has 1000 digits is:</p>
<pre class="brush: fsharp">
let has1000Digits n =
   let oneThousandDigits = (BigInt.pow 10I 999I)
   n &gt;= oneThousandDigits
</pre>
<p>with this change it runs considerably faster.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

