<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face="Courier New" size=2>"Alan Gauld" &lt;</FONT><A 
href="mailto:alan.gauld@btinternet.com"><FONT face="Courier New" 
size=2>alan.gauld@btinternet.com</FONT></A><FONT face="Courier New" size=2>&gt; 
wrote</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&gt; were infinite using floats! So you 
need to calculate the<BR>&gt; total as you go without saving the values<BR>&gt; 
<BR></FONT></DIV>
<DIV><FONT face="Courier New" size=2>I got curious so wrote the following 
function:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&gt;&gt;&gt; def 
fibtot(N):<BR>...&nbsp;&nbsp; f0,f1,tot = 0,1,1<BR>...&nbsp;&nbsp; for n in 
range(N):<BR>...&nbsp;&nbsp;&nbsp;&nbsp; f = f0 + 
f1<BR>...&nbsp;&nbsp;&nbsp;&nbsp; f0,f1 = f1,f<BR>...&nbsp;&nbsp;&nbsp;&nbsp; if 
n % 2 == 0: tot += f<BR>...&nbsp;&nbsp; return tot</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>and here are the results...</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>&gt;&gt;&gt; 
len(str(fibtot(10000)))<BR>2090<BR>&gt;&gt;&gt; 
len(str(fibtot(100000)))<BR>20899<BR>&gt;&gt;&gt; 
len(str(fibtot(200000)))<BR>41798<BR>&gt;&gt;&gt; 
len(str(fibtot(400000)))<BR>83595<BR>&gt;&gt;&gt; 
len(str(fibtot(500000)))<BR>104494<BR>&gt;&gt;&gt; 
len(str(fibtot(600000)))<BR>125393<BR>&gt;&gt;&gt; 
len(str(fibtot(800000)))<BR>167190<BR>&gt;&gt;&gt; 
len(str(fibtot(1000000)))<BR>208988<BR>&gt;&gt;&gt;</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>So the final total contains nearly 209 
thousand digits!</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Thats a very, very big number... and it 
took 5 minutes </FONT></DIV>
<DIV><FONT face="Courier New" size=2>to compute on my PC (Dual core 2.8GHz with 
2G RAM)</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Courier New" size=2>Now I really must go to bed :-)</DIV>
<DIV><BR>-- <BR>Alan Gauld<BR>Author of the Learn to Program web site<BR><A 
href="http://www.freenetpages.co.uk/hp/alan.gauld">http://www.freenetpages.co.uk/hp/alan.gauld</A></FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT>&nbsp;</DIV></BODY></HTML>