Changeset 1374bc in git for libpolys


Ignore:
Timestamp:
Nov 23, 2011, 3:29:54 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
da6ad4f6a78a843c8fb63f7d9e3cfa84d075fdd7
Parents:
8fee8407b328f6852dc1ff5372e3f43552ca5fe4
Message:
Fix: normalform for transext::ntDiv, Tests for transext
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/transext.cc

    r8fee84 r1374bc  
    138138  assume(NUM(t) != NULL);   /**< t != 0 ==> numerator(t) != 0 */
    139139  p_Test(NUM(t), ntRing);
    140   if (!DENIS1(t)) p_Test(DEN(t), ntRing);
     140  if (!DENIS1(t))
     141  {
     142    p_Test(DEN(t), ntRing);
     143    if(p_IsConstant(DEN(t),ntRing) && (n_IsOne(pGetCoeff(DEN(t)),ntRing->cf)))
     144    {
     145      Print("?/1 in %s:%d\n",f,l);
     146       return FALSE;
     147    }
     148  }
    141149  return TRUE;
    142150}
     
    561569  fraction result = (fraction)omAlloc0Bin(fractionObjectBin);
    562570  NUM(result) = g;
    563   DEN(result) = f;
     571  if (!p_IsConstant(f,ntRing) || !n_IsOne(pGetCoeff(f),ntRing->cf))
     572    DEN(result) = f;
    564573  COM(result) = COM(fa) + COM(fb) + MULT_COMPLEXITY;
    565574  heuristicGcdCancellation((number)result, cf);
Note: See TracChangeset for help on using the changeset viewer.