Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

/magnus/back_end/general/include/GCD.h

Go to the documentation of this file.
00001 // Copyright (C) 1996 The New York Group Theory Cooperative
00002 // See magnus/doc/COPYRIGHT for the full notice.
00003 
00004 // Contents:
00005 //
00006 // Function(s) to compute greatest common divisor.
00007 //
00008 // Principal Authors: Eugene Paderin, Dmitry Pechkin
00009 //
00010 // Status: draft
00011 //
00012 // Revision History:
00013 //
00014 // Discussion:
00015 //
00016 // Bugs:
00017 //
00018 //
00019 // Special Notes:
00020 //
00021 //
00022 
00023 #ifndef _GCD_H_
00024 #define _GCD_H_
00025 
00026 int GCD(int a, int b);
00027 // the greatest common divisor
00028 
00029 int GCD(int a, int b, int& p, int& q);
00030 //for given a, b finds the greatest common divisor and p, q 
00031 //such that p*a + q*b = gcd(a,b).
00032 
00033 
00034 int LCM(int a, int b);
00035 // the least common multiplier
00036 
00037 
00038 #endif
00039 

Generated at Tue Jun 19 09:49:35 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001