unsigned_int_gcd_helper Struct Reference

#include <int.hpp>

List of all members.

Static Public Member Functions


Detailed Description

Definition at line 661 of file int.hpp.


Member Function Documentation

static I gcd ( const I &  a,
const I &  b 
) [inline, static]

Definition at line 663 of file int.hpp.

References mmx::I().

00663                                         {
00664     I r0=a, r1=b, q, t; 
00665     if ((r0 == 0) && (r1 != 0)) {
00666       q = (r0-r1) / r1 + 1;
00667       t = r0 - q * r1;
00668       r0 = r1;
00669       r1 = t;
00670     }
00671     while (r1 != 0) {
00672       q = r0 / r1;
00673       t = r0 - q * r1;
00674       r0 = r1;
00675       r1 = t;
00676     }
00677     return r0;
00678   }


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1