The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(38G) IEGCD or Bézout
03-15-2015, 09:54 AM (This post was last modified: 06-15-2017 01:56 PM by Gene.)
Post: #1
(38G) IEGCD or Bézout
For input

{A,B}

in HOME the programme returns

{x,y,z}

in Ans, where

x*A+y*B=GCD(A,B)=z.

Ans►L0:
Ans(1)►X:
L0(2)►I:
(X,1)►Z0:
(I,0)►Z1:
WHILE RE(Z1)
REPEAT
Z1►Z3:
Z0-INT(RE(Z0)/RE(Z1))*Z1►Z1:
Z3►Z0:
END:
IM(Z0):
{Ans,ROUND((RE(Z0)-X*Ans)/I,0),RE(Z0)}*SIGN(RE(Z0)):
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(38G) IEGCD or Bézout - Gerald H - 03-15-2015 09:54 AM



User(s) browsing this thread: 2 Guest(s)