My Project
Loading...
Searching...
No Matches
Functions
int_rat.cc File Reference
#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "int_rat.h"
#include "int_int.h"
#include "imm.h"
#include "canonicalform.h"
#include "cf_factory.h"
#include "gmpext.h"

Go to the source code of this file.

Functions

static long intgcd (long a, long b)
 

Function Documentation

◆ intgcd()

static long intgcd ( long  a,
long  b 
)
static

Definition at line 17 of file int_rat.cc.

18{
19 if ( a < 0 ) a = -a;
20 if ( b < 0 ) b = -b;
21
22 long c;
23
24 while ( b != 0 )
25 {
26 c = a % b;
27 a = b;
28 b = c;
29 }
30 return a;
31}
CanonicalForm b
Definition: cfModGcd.cc:4103