Skip to content

Commit c8e0300

Browse files
committed
fix: normalization while mapping
1 parent e71b679 commit c8e0300

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

libpolys/polys/ext_fields/transext.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ number ntMap00(number a, const coeffs src, const coeffs dst)
10451045
if (n_IsZero(a, src)) return NULL;
10461046
assume(src == dst->extRing->cf);
10471047
poly p = p_One(dst->extRing);
1048-
p_SetCoeff(p, n_Copy(a, src), dst->extRing);
1048+
number na=n_Copy(a, src);
1049+
n_Normalize(na, src);
1050+
p_SetCoeff(p, na, dst->extRing);
10491051
fraction f = (fraction)omAlloc0Bin(fractionObjectBin);
10501052
NUM(f) = p; DEN(f) = NULL; COM(f) = 0;
10511053
return (number)f;
@@ -1232,6 +1234,21 @@ nMapFunc ntSetMap(const coeffs src, const coeffs dst)
12321234

12331235
return NULL; /// default
12341236
}
1237+
#if 0
1238+
nMapFunc ntSetMap_T(const coeffs src, const coeffs dst)
1239+
{
1240+
nMapFunc n=ntSetMap(src,dst);
1241+
if (n==ntCopyAlg) printf("n=ntCopyAlg\n");
1242+
else if (n==ntCopyMap) printf("n=ntCopyMap\n");
1243+
else if (n==ntMapUP) printf("n=ntMapUP\n");
1244+
else if (n==ntMap0P) printf("n=ntMap0P\n");
1245+
else if (n==ntMapP0) printf("n=ntMapP0\n");
1246+
else if (n==ntMap00) printf("n=ntMap00\n");
1247+
else if (n==NULL) printf("n=NULL\n");
1248+
else printf("n=?\n");
1249+
return n;
1250+
}
1251+
#endif
12351252

12361253
void ntKillChar(coeffs cf)
12371254
{

0 commit comments

Comments
 (0)