#include <int.hpp>
List of all members.
Static Public Member Functions
- template<typename I > static I gcd (const I &a, const I &b)
Detailed Description
Definition at line 527 of file int.hpp.
Member Function Documentation
static I gcd |
( |
const I & |
a, |
|
|
const I & |
b |
|
) |
| [inline, static] |
Definition at line 529 of file int.hpp.
References mmx::I().
{
I r0=a, r1=b, q, t;
if ((r0 == 0) && (r1 != 0)) {
q = (r0-r1) / r1 + 1;
t = r0 - q * r1;
r0 = r1;
r1 = t;
}
while (r1 != 0) {
q = r0 / r1;
t = r0 - q * r1;
r0 = r1;
r1 = t;
}
return r0;
}
The documentation for this struct was generated from the following file:
- /Users/mourrain/Devel/mmx/basix/include/basix/int.hpp