commit 9395a6d870695a035188a854510c170cdc51f81f
Author: Oleksandr Motsak <motsak@mathematik.unikl.de>
Date: Sun Oct 3 22:36:09 2010 +0200
Fixing the bug (http://www.singular.unikl.de:8002/trac/ticket/233)
diff git a/kernel/gring.cc b/kernel/gring.cc
index 51408a3..28dca1c 100644
a

b

poly gnc_uu_Mult_ww_vert (int i, int a, int j, int b, const ring r) 
988  988  { 
989  989  int k,m; 
990  990  int rN=r>N; 
991   matrix cMT=r>GetNC()>MT[UPMATELEM(j,i,rN)]; /* cMT=current MT */ 
 991  const int cMTindex = UPMATELEM(j,i,rN); 
 992  matrix cMT=r>GetNC()>MT[cMTindex]; /* cMT=current MT */ 
992  993  
993  994  poly x=pOne();p_SetExp(x,j,1,r);p_Setm(x,r); 
994  995  /* var(j); */ 
… 
… 
poly gnc_uu_Mult_ww_vert (int i, int a, int j, int b, const ring r) 
1010  1011  t = nc_p_CopyGet(MATELEM(cMT,k1,1),r); 
1011  1012  // t=p_Copy(MATELEM(cMT,k1,1),r); 
1012  1013  t = gnc_mm_Mult_p(y,t,r); 
 1014  cMT=r>GetNC()>MT[cMTindex]; // since multiplication can change the MT table... 
 1015  assume( t != NULL ); 
 1016  #ifdef PDEBUG 
 1017  p_Test(t,r); 
 1018  #endif 
1013  1019  MATELEM(cMT,k,1) = nc_p_CopyPut(t,r); 
1014  1020  // omCheckAddr(cMT>m); 
1015  1021  p_Delete(&t,r); 
… 
… 
poly gnc_uu_Mult_ww_vert (int i, int a, int j, int b, const ring r) 
1024  1030  if (t==NULL) //not computed yet 
1025  1031  { 
1026  1032  t = nc_p_CopyGet(MATELEM(cMT,a,m1),r); 
 1033  assume( t != NULL ); 
1027  1034  // t=p_Copy(MATELEM(cMT,a,m1),r); 
1028  1035  t = gnc_p_Mult_mm(t,x,r); 
 1036  cMT=r>GetNC()>MT[cMTindex]; // since multiplication can change the MT table... 
 1037  #ifdef PDEBUG 
 1038  p_Test(t,r); 
 1039  #endif 
1029  1040  MATELEM(cMT,a,m) = nc_p_CopyPut(t,r); 
1030  1041  // MATELEM(cMT,a,m) = t; 
1031  1042  // omCheckAddr(cMT>m); 
… 
… 
poly gnc_uu_Mult_ww_vert (int i, int a, int j, int b, const ring r) 
1035  1046  } 
1036  1047  p_Delete(&x,r); 
1037  1048  p_Delete(&y,r); 
1038   // t=MATELEM(cMT,a,b); 
1039   t= nc_p_CopyGet(MATELEM(cMT,a,b),r); 
 1049  t=MATELEM(cMT,a,b); 
 1050  assume( t != NULL ); 
 1051  
 1052  t= nc_p_CopyGet(t,r); 
 1053  #ifdef PDEBUG 
 1054  p_Test(t,r); 
 1055  #endif 
1040  1056  // return(p_Copy(t,r)); 
1041  1057  /* since the last computed element was cMT[a,b] */ 
1042  1058  return(t); 