正在加载图片...
6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 4.3.11 After the next step, we will multiply our current product by a Iterative algorithm to compute aab as a table and keep track of that new result, plus the fact that we have one In this ta less thing to do One column for each piece of information used Iterative algorithm to compute a b as a table Slide 4.3.12 And this process we can continue until In this table One column for each piece of information used product counter a a 2 b-2 a a 3 b-3 6001 SICP Slide 4.3.13 Iterative algorithm to compute a b as a table we reach a point where we have no further multiplies to do or each piece of information used each step 234 <84003 Iterative algorithm to compute a b as a table Slide 4.3.14 Now. what are the stages of this Itation? To get the next In this table One column for each piece of information used value for the product, we take the current value of the product ab-4 a/0 0 multiplications That updates the other state variabe e and the value of a, multiply together, and keep That updates produ one of the state variables. To get the next value of counter, we simply subtract 1, since we have done one more of th 1001 SICP6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 4.3.11 After the next step, we will multiply our current product by a and keep track of that new result, plus the fact that we have one less thing to do. Slide 4.3.12 And this process we can continue until ... Slide 4.3.13 ... we reach a point where we have no further multiplies to do. Slide 4.3.14 Now, what are the stages of this computation? To get the next value for the product, we take the current value of the product and the value of a, multiply together, and keep. That updates one of the state variables. To get the next value of counter, we simply subtract 1, since we have done one more of the multiplications. That updates the other state variable
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有