All that code came straight out of the text, except that I used if instead of cond. The sum, accu-sum, and g-series defs are all given. In your results I see a difference. When I run it at home it&#39;s the same. I can even (equal? (sum (listof number)) (accu-sum (listof number))) and get true.<br>
<br>
<div class="gmail_quote">On Tue, Jan 4, 2011 at 08:10, Carl Eastlund <span dir="ltr">&lt;<a href="mailto:cce@ccs.neu.edu">cce@ccs.neu.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Luke,<br><br>In the future, please do not post complete (or nearly complete)<br>homework solutions to the list. Try to find a slightly more indirect<br>
way to ask your question -- we&#39;re happy to answer, we just don&#39;t want<br>copy/paste solutions floating around. For now, though, here are the<br>results I get with your code:<br><br>Welcome to Racket v5.0.99.5.<br>
&gt; (require &quot;31.3.1.rkt&quot;)<br>-0.4974659600326926<br>-0.49746596003269405<br>-4974659600326926.0<br>-4974659600326941.0<br>&gt;<br><br>Those look different to me. Try subtracting one from the other to see<br>how different. Or, show us the results you get if you don&#39;t get the<br>
same results.<br><font color="#888888"><br>Carl Eastlund<br></font>
<div>
<div></div>
<div class="h5"><br>On Mon, Jan 3, 2011 at 10:48 PM, Luke Jordan &lt;<a href="mailto:luke.jordan@gmail.com">luke.jordan@gmail.com</a>&gt; wrote:<br>&gt; When I run the plain recursive vs. the accumulator version of sum with<br>
&gt; g-series, I get the same result, which the text says isn&#39;t supposed to<br>&gt; happen. Code attached. What am I missing?<br>&gt; Luke<br></div></div></blockquote></div><br>