Changeset 4567e8e in git
- Timestamp:
- Feb 20, 2017, 12:19:50 PM (6 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 1d8b37332905599d7dd138313bbc02aff3627905
- Parents:
- def3b20bda0f43d4d4bd310a2976c396c69d0bd7
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Tst/Short/ok_s.lst
rdef3b2 r4567e8e 68 68 bug_tr774 69 69 bug_tr778 70 bug_tr779 70 71 bug_genus_etc 71 72 conv_bi -
libpolys/polys/ext_fields/transext.cc
rdef3b2 r4567e8e 781 781 } 782 782 783 /* this method will only consider the numerator of a, without cancelling 784 the gcd before; 785 returns TRUE iff the leading coefficient of the numerator of a is > 0 786 or the leading term of the numerator of a is not a 787 constant */ 783 /* return FALSE, if a is a constant <=0 */ 788 784 static BOOLEAN ntGreaterZero(number a, const coeffs cf) 789 785 { … … 796 792 } 797 793 798 /* This method will only consider the numerators of a and b, without799 cancelling gcd's before.800 Moreover it may return TRUE only if one or both numerators801 are zero or if their degrees are equal. Then TRUE is returned iff802 coeff(numerator(a)) > coeff(numerator(b));803 In all other cases, FALSE will be returned. */804 794 static BOOLEAN ntGreater(number a, number b, const coeffs cf) 805 795 { … … 812 802 number bNumCoeff = NULL; int bNumDeg = 0; 813 803 number bDenCoeff = NULL; int bDenDeg = 0; 814 if (!IS0(a)) 804 if (IS0(a)) 805 { 806 if (IS0(b)) return FALSE; 807 fraction fb = (fraction)b; 808 return (!n_GreaterZero(pGetCoeff(NUM(fb)), ntCoeffs)); 809 } 810 if (IS0(b)) 815 811 { 816 812 fraction fa = (fraction)a; 817 aNumDeg = p_Totaldegree(NUM(fa), ntRing); 818 aNumCoeff = p_GetCoeff(NUM(fa), ntRing); 819 if (DEN(fa)!=NULL) 820 { 821 aDenDeg = p_Totaldegree(DEN(fa), ntRing); 822 aDenCoeff=p_GetCoeff(DEN(fa),ntRing); 823 } 824 } 825 else return !(ntGreaterZero (b,cf)); 826 if (!IS0(b)) 827 { 828 fraction fb = (fraction)b; 829 bNumDeg = p_Totaldegree(NUM(fb), ntRing); 830 bNumCoeff = p_GetCoeff(NUM(fb), ntRing); 831 if (DEN(fb)!=NULL) 832 { 833 bDenDeg = p_Totaldegree(DEN(fb), ntRing); 834 bDenCoeff=p_GetCoeff(DEN(fb),ntRing); 835 } 836 } 837 else return ntGreaterZero(a,cf); 813 return (n_GreaterZero(pGetCoeff(NUM(fa)), ntCoeffs)); 814 } 815 // now: a!=0, b!=0 816 fraction fa = (fraction)a; 817 aNumDeg = p_Totaldegree(NUM(fa), ntRing); 818 aNumCoeff = p_GetCoeff(NUM(fa), ntRing); 819 if (DEN(fa)!=NULL) 820 { 821 aDenDeg = p_Totaldegree(DEN(fa), ntRing); 822 aDenCoeff=p_GetCoeff(DEN(fa),ntRing); 823 } 824 fraction fb = (fraction)b; 825 bNumDeg = p_Totaldegree(NUM(fb), ntRing); 826 bNumCoeff = p_GetCoeff(NUM(fb), ntRing); 827 if (DEN(fb)!=NULL) 828 { 829 bDenDeg = p_Totaldegree(DEN(fb), ntRing); 830 bDenCoeff=p_GetCoeff(DEN(fb),ntRing); 831 } 838 832 if (aNumDeg-aDenDeg > bNumDeg-bDenDeg) return TRUE; 839 833 if (aNumDeg-aDenDeg < bNumDeg-bDenDeg) return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.