[BACK]Return to poly.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / builtin

Diff for /OpenXM_contrib2/asir2000/builtin/poly.c between version 1.23 and 1.28

version 1.23, 2011/07/20 03:19:11 version 1.28, 2018/03/27 06:29:19
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_contrib2/asir2000/builtin/poly.c,v 1.22 2011/03/30 02:43:18 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/builtin/poly.c,v 1.27 2017/09/06 06:25:26 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
Line 125  struct ftab poly_tab[] = {
Line 125  struct ftab poly_tab[] = {
         {"maxblen",Pmaxblen,1},          {"maxblen",Pmaxblen,1},
         {"ord",Pord,-1},          {"ord",Pord,-1},
         {"remove_vars",Premove_vars,1},          {"remove_vars",Premove_vars,1},
           {"delete_vars",Premove_vars,1},
         {"coef0",Pcoef0,-3},          {"coef0",Pcoef0,-3},
         {"coef",Pcoef,-3},          {"coef",Pcoef,-3},
         {"coef_gf2n",Pcoef_gf2n,2},          {"coef_gf2n",Pcoef_gf2n,2},
Line 147  struct ftab poly_tab[] = {
Line 148  struct ftab poly_tab[] = {
         {"ch_mv",Pch_mv,2},          {"ch_mv",Pch_mv,2},
         {"re_mv",Pre_mv,2},          {"re_mv",Pre_mv,2},
   
         {"ptomp",Pptomp,2},          {"ptomp",Pptomp,-2},
         {"mptop",Pmptop,1},          {"mptop",Pmptop,1},
   
         {"ptolmp",Pptolmp,1},          {"ptolmp",Pptolmp,1},
Line 456  void Pord(NODE arg,LIST *listp)
Line 457  void Pord(NODE arg,LIST *listp)
         V *va;          V *va;
         V v;          V v;
   
   printf("LASTCO="); printv(CO,LASTCO->v); printf("\n");
         if ( current_option ) {          if ( current_option ) {
                 for ( opt = current_option; opt; opt = NEXT(opt) ) {                  for ( opt = current_option; opt; opt = NEXT(opt) ) {
                         p = BDY((LIST)BDY(opt));                          p = BDY((LIST)BDY(opt));
Line 499  void Pord(NODE arg,LIST *listp)
Line 501  void Pord(NODE arg,LIST *listp)
                                         VR(tvl) = v;                                          VR(tvl) = v;
                                 }                                  }
                         }                          }
                   } else {
                           for ( svl = vl; svl; svl = NEXT(svl) ) {
                                   if ( svl->v->attr == (pointer)V_PF )
                                           ((PFINS)svl->v->priv)->pf->ins = 0;
                           }
                 }                  }
                 if ( vl )                  if ( vl )
                         NEXT(tvl) = 0;                          NEXT(tvl) = 0;
                 CO = vl;                  CO = vl;
                   update_LASTCO();
         }          }
         for ( n = 0, vl = CO; vl; vl = NEXT(vl) ) {          for ( n = 0, vl = CO; vl; vl = NEXT(vl) ) {
                 NEXTNODE(n,tn); MKV(VR(vl),t); BDY(tn) = (pointer)t;                  NEXTNODE(n,tn); MKV(VR(vl),t); BDY(tn) = (pointer)t;
Line 820  void Psetmod_ff(NODE arg,Obj *rp)
Line 828  void Psetmod_ff(NODE arg,Obj *rp)
         if ( ac == 1 ) {          if ( ac == 1 ) {
                 mod = (Obj)ARG0(arg);                  mod = (Obj)ARG0(arg);
                 if ( !mod )                  if ( !mod )
                         error("setmod_ff : invalid argument");              current_ff = FF_NOT_SET;
                 switch ( OID(mod) ) {          else {
                     switch ( OID(mod) ) {
                         case O_N:                          case O_N:
                                 current_ff = FF_GFP;                                  current_ff = FF_GFP;
                                 setmod_lm(NM((Q)mod));                                  setmod_lm(NM((Q)mod));
Line 831  void Psetmod_ff(NODE arg,Obj *rp)
Line 840  void Psetmod_ff(NODE arg,Obj *rp)
                                 setmod_gf2n((P)mod); break;                                  setmod_gf2n((P)mod); break;
                         default:                          default:
                                 error("setmod_ff : invalid argument");                                  error("setmod_ff : invalid argument");
                 }                    }
         }
         } else if ( ac == 2 ) {          } else if ( ac == 2 ) {
                 if ( OID(ARG0(arg)) == O_N ) {                  if ( OID(ARG0(arg)) == O_N ) {
                         /* small finite field; primitive root representation */                          /* small finite field; primitive root representation */
Line 1131  void mergedeglist(NODE d0,NODE d1,NODE *dr)
Line 1141  void mergedeglist(NODE d0,NODE d1,NODE *dr)
   
 void Pptomp(NODE arg,P *rp)  void Pptomp(NODE arg,P *rp)
 {  {
         ptomp(QTOS((Q)ARG1(arg)),(P)ARG0(arg),rp);    int mod;
   
     if ( argc(arg) == 1 ) {
       if ( !current_mod )
         error("ptomp : current_mod is not set");
       else
         mod = current_mod;
     } else
       mod = QTOS((Q)ARG1(arg));
           ptomp(mod,(P)ARG0(arg),rp);
 }  }
   
 void Pmptop(NODE arg,P *rp)  void Pmptop(NODE arg,P *rp)

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.28

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