[BACK]Return to NEZ.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / engine

Diff for /OpenXM_contrib2/asir2018/engine/NEZ.c between version 1.1 and 1.2

version 1.1, 2018/09/19 05:45:07 version 1.2, 2018/09/28 08:20:28
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  *   *
  * $OpenXM$   * $OpenXM: OpenXM_contrib2/asir2018/engine/NEZ.c,v 1.1 2018/09/19 05:45:07 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
   
Line 203  P *r;
Line 203  P *r;
   for ( n = 0, dc = dcl[0]; dc; dc = NEXT(dc), n++ );    for ( n = 0, dc = dcl[0]; dc; dc = NEXT(dc), n++ );
   vn = (VN)ALLOCA(n*sizeof(struct oVN));    vn = (VN)ALLOCA(n*sizeof(struct oVN));
   for ( i = 0, dc = dcl[0]; i < n; dc = NEXT(dc), i++ ) {    for ( i = 0, dc = dcl[0]; i < n; dc = NEXT(dc), i++ ) {
     vn[i].v = VR(COEF(dc)); vn[i].n = QTOS(DEG(dc));      vn[i].v = VR(COEF(dc)); vn[i].n = ZTOS(DEG(dc));
   }    }
   for ( i = 1; i < m; i++ ) {    for ( i = 1; i < m; i++ ) {
     for ( j = 0; j < n; j++ ) {      for ( j = 0; j < n; j++ ) {
       for ( dc = dcl[i]; dc; dc = NEXT(dc) )        for ( dc = dcl[i]; dc; dc = NEXT(dc) )
         if ( VR(COEF(dc)) == vn[j].v ) {          if ( VR(COEF(dc)) == vn[j].v ) {
           vn[j].n = MIN(vn[j].n,QTOS(DEG(dc))); break;            vn[j].n = MIN(vn[j].n,ZTOS(DEG(dc))); break;
         }          }
       if ( !dc )        if ( !dc )
         vn[j].n = 0;          vn[j].n = 0;
Line 222  P *r;
Line 222  P *r;
   }    }
   for ( j = 0, g = (P)ONE; j < n; j++ )    for ( j = 0, g = (P)ONE; j < n; j++ )
     if ( vn[j].n ) {      if ( vn[j].n ) {
       MKV(vn[j].v,x); STOQ(vn[j].n,d);        MKV(vn[j].v,x); STOZ(vn[j].n,d);
       pwrp(vl,x,d,&t); mulp(vl,t,g,&s); g = s;        pwrp(vl,x,d,&t); mulp(vl,t,g,&s); g = s;
     }      }
   *r = g;    *r = g;
Line 277  P *r;
Line 277  P *r;
       *r = gcd; return;        *r = gcd; return;
     }      }
   }    }
   for ( g = gcd, k = QTOS(DEG(dc))-1; k > 0; k-- ) {    for ( g = gcd, k = ZTOS(DEG(dc))-1; k > 0; k-- ) {
     nezgcdnp_sqfr_primitive(vl,g,pm,m,&t);      nezgcdnp_sqfr_primitive(vl,g,pm,m,&t);
     if ( NUM(t) )      if ( NUM(t) )
       break;        break;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>