Don't have an account? Register now to chat, post, use our tools, and much more.
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
Author Message
Ed H

Member

Joined: 30 Nov 2007
Posts: 138

 Posted: 02 Feb 2010 08:17:07 pm    Post subject: So you wanna perform the Extended Euclidean algorithm on two numbers A and B, eh? Code: :{1,i,A+Bi :While imag(Ans(3 :iconj(Ans-imag(Ans)int(real(Ans(3)/imag(Ans(3 :End :real(Ans You'll end up with a list {X,Y,C} with XA + YB = C, where C is the GCD of A and B. On a related note, Code: :Ans+i :While E-9
Weregoose
Authentic INTJ

Super Elite (Last Title)

Joined: 25 Nov 2004
Posts: 3976

 Posted: 02 Feb 2010 09:54:28 pm    Post subject: Aside from my swapping every real( and imag( in this post, we used the exact same method. Last edited by Guest on 01 Jul 2010 09:51:54 am; edited 1 time in total
Ed H

Member

Joined: 30 Nov 2007
Posts: 138

 Posted: 04 Feb 2010 12:01:11 am    Post subject: Haha, sweet. I came up with that idea when I realized how repetitive the operations in the extended Euclidean algorithm were. I wanted to take advantage of this by using lists for the variables X, Y, and A/B, which required me to use complex numbers to store both values in one element.
 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.

»
 Page 1 of 1 » All times are GMT - 5 Hours