Index: tol/bmath/barith/arith.cpp
===================================================================
--- tol/bmath/barith/arith.cpp	(revision 2c0158dfbb4e8055e4b7771447fbc69753cfd309)
+++ tol/bmath/barith/arith.cpp	(revision 72b4d96b75b01f6a83e68793581b836549f72ee4)
@@ -27,4 +27,5 @@
 #include <tol/tol_bout.h>
 #include <tol/tol_barith.h>
+#include <boost/math/common_factor_rt.hpp>
 
 BTraceInit("arith.cpp");
@@ -265,2 +266,61 @@
     while(N<n);
 }
+
+
+//--------------------------------------------------------------------
+int GreatestCommonDivisor(int a, int b)
+
+/*! Return the Greatest Common Divisor of two integers
+ */
+//--------------------------------------------------------------------
+{
+  return(boost::math::gcd(a,b));
+}
+
+//--------------------------------------------------------------------
+int LeastCommonMultiple(int a, int b)
+
+/*! Return the Least Common Multiple of two integers
+ */
+//--------------------------------------------------------------------
+{
+  return(boost::math::lcm(a,b));
+}
+
+//--------------------------------------------------------------------
+int GreatestCommonDivisor(const BArray<int>& a)
+
+/*! Return the Greatest Common Divisor of an array of integers
+ */
+//--------------------------------------------------------------------
+{
+  int s = a.Size();
+  if(!s) { return(0); }
+  int i;
+  int gcd = a[0];
+  for(i=1; i<s; i++)
+  {
+    gcd = boost::math::gcd(gcd,a[i]);
+  }
+  return(gcd);
+}
+
+//--------------------------------------------------------------------
+int LeastCommonMultiple(const BArray<int>& a)
+
+/*! Return the Least Common Multiple of an array of integers
+ */
+//--------------------------------------------------------------------
+{
+  int s = a.Size();
+  if(!s) { return(0); }
+  int i;
+  int lcm = a[0];
+  for(i=1; i<s; i++)
+  {
+    lcm = boost::math::lcm(lcm,a[i]);
+  }
+  return(lcm);
+}
+
+
Index: tol/bmath/barith/tol_barith.h
===================================================================
--- tol/bmath/barith/tol_barith.h	(revision 2c0158dfbb4e8055e4b7771447fbc69753cfd309)
+++ tol/bmath/barith/tol_barith.h	(revision 72b4d96b75b01f6a83e68793581b836549f72ee4)
@@ -50,4 +50,9 @@
 TOL_API void FirstPrimes(BInt n, BArray<BInt>& p);
 
+TOL_API int GreatestCommonDivisor(int a, int b);
+TOL_API int LeastCommonMultiple(int a, int b);
+TOL_API int GreatestCommonDivisor(const BArray<int>& a);
+TOL_API int LeastCommonMultiple(const BArray<int>& a);
+
 inline ldouble Abs	(BInt a)  { return(fabsl(a)); }
 inline ldouble Sqrt	(BInt a)  { return(sqrtl(a)); }
Index: tol/btol/real_type/datgra.cpp
===================================================================
--- tol/btol/real_type/datgra.cpp	(revision 2c0158dfbb4e8055e4b7771447fbc69753cfd309)
+++ tol/btol/real_type/datgra.cpp	(revision 72b4d96b75b01f6a83e68793581b836549f72ee4)
@@ -39,4 +39,5 @@
 #include <tol/tol_bmatfun.h>
 #include <tol/tol_bvmat.h>
+#include <tol/tol_barith.h>
 #include <float.h>
 
@@ -1076,2 +1077,54 @@
 
 
+//--------------------------------------------------------------------
+  DeclareContensClass(BDat, BDatTemporary, BDatGreatestCommonDivisor);
+  DefIntOpr(1, BDatGreatestCommonDivisor, "GreatestCommonDivisor", 1, 0,
+  "(Real x1, [ Real x2 , ...])",
+  I2("Returns the Greatest Common Divisor of a list of positive "
+     "integer numbers. If any given number is unklnown or is not "
+     "integer and positive the unknown value will be returned.",
+     "Devuelve el Máximo Común Divisor de una lista de números "
+     "enteros positivos. Si algún número es desconocido o no es entero "
+     "y positivo se devolverá el valor desconocido."),
+  BOperClassify::RealArythmetic_);
+  void BDatGreatestCommonDivisor::CalcContens()
+//--------------------------------------------------------------------
+{ 
+  int gcd = -1;
+  int n;
+  for(n=1; n<=NumArgs(); n++)
+  {
+    BDat& x = Dat(Arg(n));
+    if(x.IsUnknown() || (x<=0) || !x.IsInteger()) { return; }
+    if(gcd == -1) { gcd = (int)x.Value(); }
+    else          { gcd = GreatestCommonDivisor(gcd, (int)x.Value()); }
+  }
+  contens_ = gcd;
+}
+
+//--------------------------------------------------------------------
+  DeclareContensClass(BDat, BDatTemporary, BDatLeastCommonMultiple);
+  DefIntOpr(1, BDatLeastCommonMultiple, "LeastCommonMultiple", 1, 0,
+  "(Real x1, [ Real x2 , ...])",
+  I2("Returns the Greatest Common Divisor of a list of positive "
+     "integer numbers. If any given number is unklnown or is not "
+     "integer and positive the unknown value will be returned.",
+     "Devuelve el Máximo Común Divisor de una lista de números "
+     "enteros positivos. Si algún número es desconocido o no es entero "
+     "y positivo se devolverá el valor desconocido."),
+  BOperClassify::RealArythmetic_);
+  void BDatLeastCommonMultiple::CalcContens()
+//--------------------------------------------------------------------
+{ 
+  int lcm = -1;
+  int n;
+  for(n=1; n<=NumArgs(); n++)
+  {
+    BDat& x = Dat(Arg(n));
+    if(x.IsUnknown() || (x<=0) || !x.IsInteger()) { return; }
+    if(lcm == -1) { lcm = (int)x.Value(); }
+    else          { lcm = LeastCommonMultiple(lcm, (int)x.Value()); }
+  }
+  contens_ = lcm;
+}
+
