Index: kernel/longalg.cc
===================================================================
--- kernel/longalg.cc	(revision 73624c6eb72939321ed403d522f0f94a290bca1a)
+++ kernel/longalg.cc	(revision cdec339887c6043f1143e8edd66e4e45ad93bf0a)
@@ -66,4 +66,5 @@
   n->nIsMOne        = naIsMOne;
   n->nGreaterZero   = naGreaterZero;
+  n->nGreater       = naGreater;
   n->cfWrite        = naWrite;
   n->nRead          = naRead;
@@ -99,4 +100,5 @@
   nIsMOne = naIsMOne;
   nGreaterZero = naGreaterZero;
+  nGreater = naGreater;
   nRead = naRead;
   nPower = naPower;
@@ -174,4 +176,5 @@
   nacIsZero      = nacRing->cf->nIsZero;
   nacGreaterZero = nacRing->cf->nGreaterZero;
+  nacGreater     = nacRing->cf->nGreater;
   nacIsOne       = nacRing->cf->nIsOne;
   nacGcd         = nacRing->cf->nGcd;
@@ -737,11 +740,31 @@
 
 
+/* This method will only consider the numerators of a and b.
+   Moreover it may return TRUE only if one or both numerators
+   are zero or if their degrees are equal. Then TRUE is returned iff
+   coeff(numerator(a)) > coeff(numerator(b));
+   In all other cases, FALSE will be returned. */
 BOOLEAN naGreater (number a, number b)
 {
-  if (naIsZero(a))
-    return FALSE;
-  if (naIsZero(b))
-    return TRUE; /* a!= 0)*/
-  return napDeg(((lnumber)a)->z)>napDeg(((lnumber)b)->z);
+  int az = 0; int ad = 0;
+  if (naIsZero(a)) az = 1;
+  else ad = napDeg(((lnumber)a)->z);
+  int bz = 0; int bd = 0;
+  if (naIsZero(b)) bz = 1;
+  else bd = napDeg(((lnumber)b)->z);
+  
+  if ((az == 1) && (bz == 1)) /* a = b = 0 */ return FALSE;
+  if (az == 1) /* a = 0, b != 0 */
+  {
+    return (!nacGreaterZero(pGetCoeff(((lnumber)b)->z)));
+  }
+  if (bz == 1) /* a != 0, b = 0 */
+  {
+    return (nacGreaterZero(pGetCoeff(((lnumber)a)->z)));
+  }
+  if (ad == bd)  
+    return nacGreater(pGetCoeff(((lnumber)a)->z),
+                      pGetCoeff(((lnumber)b)->z));
+  return FALSE;
 }
 
Index: kernel/longtrans.cc
===================================================================
--- kernel/longtrans.cc	(revision 73624c6eb72939321ed403d522f0f94a290bca1a)
+++ kernel/longtrans.cc	(revision cdec339887c6043f1143e8edd66e4e45ad93bf0a)
@@ -48,4 +48,5 @@
 BOOLEAN     (*nacIsOne)(number a);
 BOOLEAN     (*nacGreaterZero)(number a);
+BOOLEAN     (*nacGreater)(number a, number b);
 number      (*nacMap)(number);
 
@@ -102,4 +103,5 @@
   nacIsZero      = nacRing->cf->nIsZero;
   nacGreaterZero = nacRing->cf->nGreaterZero;
+  nacGreater     = nacRing->cf->nGreater;
   nacIsOne       = nacRing->cf->nIsOne;
   nacGcd         = nacRing->cf->nGcd;
@@ -1574,12 +1576,31 @@
 }
 
-
+/* This method will only consider the numerators of a and b.
+   Moreover it may return TRUE only if one or both numerators
+   are zero or if their degrees are equal. Then TRUE is returned iff
+   coeff(numerator(a)) > coeff(numerator(b));
+   In all other cases, FALSE will be returned. */
 BOOLEAN ntGreater (number a, number b)
 {
-  if (ntIsZero(a))
-    return FALSE;
-  if (ntIsZero(b))
-    return TRUE; /* a!= 0)*/
-  return napDeg(((lnumber)a)->z)>napDeg(((lnumber)b)->z);
+  int az = 0; int ad = 0;
+  if (ntIsZero(a)) az = 1;
+  else ad = napDeg(((lnumber)a)->z);
+  int bz = 0; int bd = 0;
+  if (ntIsZero(b)) bz = 1;
+  else bd = napDeg(((lnumber)b)->z);
+  
+  if ((az == 1) && (bz == 1)) /* a = b = 0 */ return FALSE;
+  if (az == 1) /* a = 0, b != 0 */
+  {
+    return (!nacGreaterZero(pGetCoeff(((lnumber)b)->z)));
+  }
+  if (bz == 1) /* a != 0, b = 0 */
+  {
+    return (nacGreaterZero(pGetCoeff(((lnumber)a)->z)));
+  }
+  if (ad == bd)  
+    return nacGreater(pGetCoeff(((lnumber)a)->z),
+                      pGetCoeff(((lnumber)b)->z));
+  return FALSE;
 }
 
Index: kernel/longtrans.h
===================================================================
--- kernel/longtrans.h	(revision 73624c6eb72939321ed403d522f0f94a290bca1a)
+++ kernel/longtrans.h	(revision cdec339887c6043f1143e8edd66e4e45ad93bf0a)
@@ -118,4 +118,5 @@
 extern BOOLEAN     (*nacIsOne)(number a);
 extern BOOLEAN     (*nacGreaterZero)(number a);
+extern BOOLEAN     (*nacGreater)(number a, number b);
 extern number      (*nacMap)(number);
 
