Re: Loops of addition Message #5 Posted by Palmer O. Hanson, Jr. on 18 June 2010, 10:06 p.m., in response to message #2 by Don Shepherd
OOPS! The numbers reported herein are with the machines operating in the APPROXIMATE mode. When the mode is changed to EXACT the count for the TI-89 for the Lbla ... Goto a changes from 6,790 to 8.860 which is substantially closer to the previously published value. Furthermore, the For ... EndFor loop increases the count instead of decreasing it as with the APPROXIMATE mode. So, I'll have to generate a new set of data for the EXACT mode and (maybe) generate a new set of data for the AUTO mode as well.
Don:
Quote:
My experience with the 33s, which does have looping instructions, is that using the looping instructions takes significantly longer than just controlling the loop manually.
I did some work with my TI-89 which is in agreement with your idea that use of looping instructions takes longer. First, I did a :Lbl a :b + 1 > b :Goto a : EndPrgm loop and got 6,790 counts which is subtantially lower than the previously published value of 9,339. I could not make the Ans + 1 method work. A For...EndFor loop gave a reduced count of 4,685 per minute. That is consistent with your comment but is not consistent with results from other TI graphic machines. A Loop...EndLoop lop gave an increased count of 7,266 counts per minute. The details are:
TI-89 Platinum: Count: 6,790: Code :Prgm :Lbl a :b + 1 > b :Goto a :EndPrgm
TI-89 Platinum: Count: 4,685: Code :Prgm : For a,1,99999 :EndFor :EndPrgm
TI-89 Platinum: Count: 7,266: Code :Prgm :Loop :a + 1 a :EndLoop :EndPrgm
I did the same tests on my TI Voyage 200 with similar results but with with counts about 3 to 4 percent higher:
TI Voyage 200: Count: 7,000: Code :Prgm :Lbl a :b + 1 > b :Goto a :EndPrgm
TI Voyage 200: Count: 4,860: Code :Prgm : For a,1,99999 :EndFor :EndPrgm
TI Voyage 200: Count: 7,546: Code :Prgm :Loop :a + 1 a :EndLoop :EndPrgm
Palmer
Edited: 18 June 2010, 11:52 p.m.
|