|
|
coherent
xgcd() Multiple-Precision Mathematics xgcd()
Extended greatest-common-divisor function
#include <mprec.h>
vvooiidd xxggccdd(_a, _b, _r, _s, _g)
mmiinntt *_a, *_b, *_r, *_s, *gg;
The COHERENT system includes a suite of routines that allow you
to perform multiple-precision mathematics. The function xgcd is
an extended version of the greatest-common-division function. It
sets the multiple-precision integer (or mmiinntt) pointed to by g to
the greatest common divisor of the mmiinntt pointed to by a and that
pointed to by b. It also sets the mmiinntts pointed to by r and s so
the following relation holds:
_g = _a * _r + _b * _s
r, s, and g must all be distinct.
***** See Also *****
multiple-precision mathematics
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.