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

Diff for /OpenXM_contrib2/asir2000/engine/gfs.c between version 1.14 and 1.17

version 1.14, 2002/12/18 06:15:40 version 1.17, 2003/05/07 06:26:49
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/engine/gfs.c,v 1.13 2002/09/30 06:13:07 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/engine/gfs.c,v 1.16 2003/01/16 00:33:28 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "inline.h"  #include "inline.h"
Line 661  int mulremum_enc(int p,int n,UM dp,int a,int b)
Line 661  int mulremum_enc(int p,int n,UM dp,int a,int b)
   
 void gfs_galois_action(GFS a,Q e,GFS *c)  void gfs_galois_action(GFS a,Q e,GFS *c)
 {  {
         Q q;          Q p;
         int i,k;          int i,k;
         GFS t,s;          GFS t,s;
   
         t = a;          t = a;
         k = QTOS(e);          k = QTOS(e);
         STOQ(current_gfs_q,q);          STOQ(current_gfs_p,p);
         for ( i = 0; i < k; i++ ) {          for ( i = 0; i < k; i++ ) {
                 pwrgfs(t,q,&s); t = s;                  pwrgfs(t,p,&s); t = s;
         }          }
         *c = t;          *c = t;
 }  }
Line 727  void qtogfs(Q a,GFS *c)
Line 727  void qtogfs(Q a,GFS *c)
 {  {
         int s;          int s;
   
           if ( a && (SGN(a) < 1) )
                   error("qtogfs : invalid argument");
         s = QTOS(a)%current_gfs_q;          s = QTOS(a)%current_gfs_q;
         itogfs(s,c);          itogfs(s,c);
 }  }
Line 748  void gfstomq(GFS a,MQ *c)
Line 750  void gfstomq(GFS a,MQ *c)
         } else {          } else {
                 UTOMQ(current_gfs_iton[CONT(a)],*c);                  UTOMQ(current_gfs_iton[CONT(a)],*c);
         }          }
   }
   
   void gfstopgfs(GFS a,V v,P *c)
   {
           MQ t;
           Q q;
   
           if ( !a )
                   *c = 0;
           else if ( !current_gfs_ntoi ) {
                   UTOMQ(CONT(a),t);
                   STOQ(CONT(t),q);
                   *c = (P)q;
           } else
                   enc_to_p(current_gfs_p,current_gfs_iton[CONT(a)],v,c);
 }  }
   
 void ntogfs(Obj a,GFS *b)  void ntogfs(Obj a,GFS *b)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.17

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