From: Harry Ohlsen Date: 2003-07-02T08:52:24+09:00 Subject: Re: Terribly OT ... ts wrote: > Well, if I'm remember correctly : if (p, q) are number in the "magic > table", then > > p = p[k-1] * (-1)**k-1 > q = q[k-1] * (-1)**k > > where p[k-1], q[k-1] are the value given by the Euclidean algorithm > > This must explain the negative number becuase it give the result of the > Euclidena algorithm. Thanks, Guy. Obviously, your definition of the table is slightly different to my old lecturer's, because his doesn't generate any negative values. I'll just have to sit down and work out where the approaches differ. That's not a problem to me, because I'm keen to understand it. That's my reason for writing the code, after all :-). Cheers, Harry O.