From leavens@larch.cs.iastate.edu Tue Nov 7 00:10:09 2006 Date: Tue, 7 Nov 2006 00:10:09 -0600 (CST) From: Gary T. Leavens To: Chris Cornelison Subject: Re: cs541 - HW6 Hi Chris, On Mon, 6 Nov 2006, Chris Cornelison wrote: > Gary, > > The typedef for ConvergesTo in the hw pdf reads > > ConvergesTo: }: T> > > which if I'm reading correctly says.. > > ConvergesTo takes to arguments > > a Stream of T, Xs > and > a function that takes a single argument T and returns a Bool, Pred > > However I see that in the test cases > > {WithinTest {ConvergesTo > {Append [1.0 3.5 4.5] {Repeat 7.0}} > {WithinMaker 1.01} > } > '~=~' 4.5} > > {WithinMaker X} is in fact returning a function that takes 2 arguments and > ultimately returns Bool. Oops, the type of ConvergesTo is wrong, it should be: ConvergesTo: }: T> So that Pred is a 2 argument predicate. I'm fixing the homework file... > If Pred needs two arguments, it seems that they should be, 1) the item from > the stream, and 2) the target value for convergence (4.5 in the test case > above). > > I don't see where I would get the target value from. At least I don't see it > passed to ConvergesTo. Since the stream is infinite, use the first two elements of the stream as the arguments to Pred. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------- From leavens@larch.cs.iastate.edu Tue Nov 7 10:32:18 2006 Date: Tue, 7 Nov 2006 10:32:18 -0600 (CST) From: Gary T. Leavens To: Chris Cornelison Subject: Re: cs541 - HW6 Hi Chris, On Tue, 7 Nov 2006, Chris Cornelison wrote: > The typedefs for the functions in problems 6 and 7 don't seem to match the > descriptions either. You are right. Sorry about that. I have now fixed the homework file. Thanks for pointing this out. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 From leavens@larch.cs.iastate.edu Sat Nov 11 01:27:04 2006 Date: Sat, 11 Nov 2006 01:27:03 -0600 (CST) From: Gary T. Leavens To: Chris Cornelison Subject: Re: cs541 - HW6 Hi Chris, On Fri, 10 Nov 2006, Chris Cornelison wrote: > Gary, > > I not sure I see how the solution to problem 13 (Digital Logic Simulation) > problem 9 in the text, is any different than the full adder solution given on > page 268-269 with z=0? I believe the difference is that you are to do n=-bit numbers instead of just 1 bit. I think it's mostly to get you to really understand the code on those pages of the book. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------- From leavens@larch.cs.iastate.edu Sat Nov 11 23:18:58 2006 Date: Sat, 11 Nov 2006 23:18:58 -0600 (CST) From: Gary T. Leavens To: Chris Cornelison Cc: Computer Science 541 Subject: Re: cs541 - HW6 problem 13 withdrawn Hi Chris, and all, Ok, I see it now. Yes, so I've withdrawn problem 13 from homework 6, you no longer have to do it. Thanks for pointing that out. On Sat, 11 Nov 2006, Chris Cornelison wrote: > Gary, > > Isn't the example on page 269 adding n-bit numbers (X, Y, and Z) already? > > It reads > > declare > X=1|1|0|_ > Y=0|1|0|_ > Z=1|1|1|_ C S in % only we need Z=0|0|0|_ for problem 13 > {FullAdder X Y Z C S} > {Browse inp(X Y Z)#sum(C S)} > > Thanks, > Chris Cornelison > > Gary T. Leavens wrote: >> Hi Chris, >> >> On Fri, 10 Nov 2006, Chris Cornelison wrote: >> >>> Gary, >>> >>> I not sure I see how the solution to problem 13 (Digital Logic >>> Simulation) problem 9 in the text, is any different than the full adder >>> solution given on page 268-269 with z=0? >> >> >> I believe the difference is that you are to do n=-bit numbers instead >> of just 1 bit. I think it's mostly to get you to really understand >> the code on those pages of the book. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------ From leavens@larch.cs.iastate.edu Mon Nov 13 11:08:16 2006 Date: Mon, 13 Nov 2006 11:08:16 -0600 (CST) From: Gary T. Leavens To: Teena G Subject: Re: COMS 541: Re: cs541 - HW6 problem 13 withdrawn Hi Teena, I see, thanks for the clarification. However, I think I'll just leave it withdrawn to avoid extra confusion at this point. On Mon, 13 Nov 2006 teena@cs.iastate.edu wrote: > Hello Dr. Leavens, > I think the problem is valid because we traverse from left to right when we > perform addition on multiple bits so the given solution for single bit in text > book will traverse from R -->L . > Regards, > Teena > > > Quoting "Gary T. Leavens" : > >> Hi Chris, and all, >> >> Ok, I see it now. Yes, so I've withdrawn problem 13 from homework 6, >> you no longer have to do it. Thanks for pointing that out. >> >> On Sat, 11 Nov 2006, Chris Cornelison wrote: >> >>> Gary, >>> >>> Isn't the example on page 269 adding n-bit numbers (X, Y, and Z) already? >>> >>> It reads >>> >>> declare >>> X=1|1|0|_ >>> Y=0|1|0|_ >>> Z=1|1|1|_ C S in % only we need Z=0|0|0|_ for problem 13 >>> {FullAdder X Y Z C S} >>> {Browse inp(X Y Z)#sum(C S)} >>> >>> Thanks, >>> Chris Cornelison >>> >>> Gary T. Leavens wrote: >>>> Hi Chris, >>>> >>>> On Fri, 10 Nov 2006, Chris Cornelison wrote: >>>> >>>>> Gary, >>>>> >>>>> I not sure I see how the solution to problem 13 (Digital Logic >>>>> Simulation) problem 9 in the text, is any different than the full adder >>>>> solution given on page 268-269 with z=0? >>>> >>>> >>>> I believe the difference is that you are to do n=-bit numbers instead >>>> of just 1 bit. I think it's mostly to get you to really understand >>>> the code on those pages of the book. Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------