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

Diff for /OpenXM_contrib2/asir2018/engine/P.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/P.c,v 1.1 2018/09/19 05:45:07 noro Exp $
 */  */
 #ifndef FBASE  #ifndef FBASE
 #define FBASE  #define FBASE
Line 163  void coefp(P p,int d,P *pr)
Line 163  void coefp(P p,int d,P *pr)
     else      else
       *pr = 0;        *pr = 0;
   else {    else {
     for ( STOQ(d,dq), dc = DC(p); dc; dc = NEXT(dc) )      for ( STOZ(d,dq), dc = DC(p); dc; dc = NEXT(dc) )
       if ( (sgn = cmpz(DEG(dc),dq)) > 0 )        if ( (sgn = cmpz(DEG(dc),dq)) > 0 )
         continue;          continue;
       else if ( sgn == 0 ) {        else if ( sgn == 0 ) {
Line 308  void mulp_trunc(VL vl,P p1,P p2,VN vn,P *pr)
Line 308  void mulp_trunc(VL vl,P p1,P p2,VN vn,P *pr)
     d = vn->n;      d = vn->n;
     for ( dc = DC(p2), s = 0; dc; dc = NEXT(dc) ) {      for ( dc = DC(p2), s = 0; dc; dc = NEXT(dc) ) {
       for ( dcr0 = 0, dct = DC(p1); dct; dct = NEXT(dct) ) {        for ( dcr0 = 0, dct = DC(p1); dct; dct = NEXT(dct) ) {
         d1 = QTOS(DEG(dct))+QTOS(DEG(dc));          d1 = ZTOS(DEG(dct))+ZTOS(DEG(dc));
         if ( d1 >= d ) {          if ( d1 >= d ) {
           mulp_trunc(vl,COEF(dct),COEF(dc),vn+1,&t);            mulp_trunc(vl,COEF(dct),COEF(dc),vn+1,&t);
           if ( t ) {            if ( t ) {
             NEXTDC(dcr0,dcr);              NEXTDC(dcr0,dcr);
             STOQ(d1,DEG(dcr));              STOZ(d1,DEG(dcr));
             COEF(dcr) = t;              COEF(dcr) = t;
           }            }
         }          }
Line 362  void mulpq_trunc(P p,Q q,VN vn,P *pr)
Line 362  void mulpq_trunc(P p,Q q,VN vn,P *pr)
     if ( !vn->v )      if ( !vn->v )
       error("mulpq_trunc : invalid vn");        error("mulpq_trunc : invalid vn");
     d = vn->n;      d = vn->n;
     for ( dcr0 = 0, dc = DC(p); dc && QTOS(DEG(dc)) >= d; dc = NEXT(dc) ) {      for ( dcr0 = 0, dc = DC(p); dc && ZTOS(DEG(dc)) >= d; dc = NEXT(dc) ) {
       mulpq_trunc(COEF(dc),q,vn+1,&t);        mulpq_trunc(COEF(dc),q,vn+1,&t);
       if ( t ) {        if ( t ) {
         NEXTDC(dcr0,dcr); COEF(dcr) = t; DEG(dcr) = DEG(dc);          NEXTDC(dcr0,dcr); COEF(dcr) = t; DEG(dcr) = DEG(dc);
Line 395  void mulpc_trunc(VL vl,P p,P c,VN vn,P *pr)
Line 395  void mulpc_trunc(VL vl,P p,P c,VN vn,P *pr)
     if ( !vn->v )      if ( !vn->v )
       error("mulpc_trunc : invalid vn");        error("mulpc_trunc : invalid vn");
     d = vn->n;      d = vn->n;
     for ( dcr0 = 0, dc = DC(p); dc && QTOS(DEG(dc)) >= d; dc = NEXT(dc) ) {      for ( dcr0 = 0, dc = DC(p); dc && ZTOS(DEG(dc)) >= d; dc = NEXT(dc) ) {
       mulp_trunc(vl,COEF(dc),c,vn+1,&t);        mulp_trunc(vl,COEF(dc),c,vn+1,&t);
       if ( t ) {        if ( t ) {
         NEXTDC(dcr0,dcr); COEF(dcr) = t; DEG(dcr) = DEG(dc);          NEXTDC(dcr0,dcr); COEF(dcr) = t; DEG(dcr) = DEG(dc);

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

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