This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

TI-Basic => TI-BASIC
 » Goto page Previous  1, 2
Author Message
DarkerLine
ceci n'est pas une |

Super Elite (Last Title)

Joined: 04 Nov 2003
Posts: 8328

 Posted: 26 Feb 2010 07:40:31 pm    Post subject: The idea with Horner's rule is that when you're trying to figure out, say Ax3+Bx2+Cx+D, you will do something of the following (in pseudocode) Set Result = 0 Set Result = Result*x+A (getting A) Set Result = Result*x+B (getting Ax+B) Set Result = Result*x+C (getting Ax2+Bx+C) Set Result = Result*x+D (getting Ax3+Bx2+Cx+D) Note how all of the steps you do are the same. When we put them in a For( loop, replace x by 2 (for binary), and replace A, B, C, D, etc. by the binary digits of the number we're converting, we get precisely the code in thornahawk's post.Last edited by Guest on 26 Feb 2010 07:40:47 pm; edited 1 time in total
meishe91

Newbie

Joined: 06 Dec 2009
Posts: 49

 Posted: 26 Feb 2010 10:43:38 pm    Post subject: DarkerLine wrote:The idea with Horner's rule is that when you're trying to figure out, say Ax3+Bx2+Cx+D, you will do something of the following (in pseudocode) Set Result = 0 Set Result = Result*x+A (getting A) Set Result = Result*x+B (getting Ax+ Set Result = Result*x+C (getting Ax2+Bx+C) Set Result = Result*x+D (getting Ax3+Bx2+Cx+D) Note how all of the steps you do are the same. When we put them in a For( loop, replace x by 2 (for binary), and replace A, B, C, D, etc. by the binary digits of the number we're converting, we get precisely the code in thornahawk's post. Hmmm...ok. Well that does make a little more sense, I'm not sure what isn't clicking for me. Ugh haha.
 Display posts from previous: All Posts Oldest FirstNewest First
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
 » Goto page Previous  1, 2 Page 2 of 2 » All times are UTC - 5 Hours