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

Diff for /OpenXM_contrib2/asir2000/engine/up_lm.c between version 1.4 and 1.5

version 1.4, 2001/05/09 01:41:42 version 1.5, 2001/09/03 07:01:06
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/up_lm.c,v 1.3 2000/08/22 05:04:07 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/engine/up_lm.c,v 1.4 2001/05/09 01:41:42 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include <math.h>  #include <math.h>
Line 408  UP *xp;
Line 408  UP *xp;
         N n;          N n;
         UP x,y,t,invf,s;          UP x,y,t,invf,s;
         int k;          int k;
         LM lm;  
         GFS fs;  
         Num c;          Num c;
         struct oEGT eg_sq,eg_rem,eg_mul,eg_inv,eg0,eg1,eg2,eg3;          struct oEGT eg_sq,eg_rem,eg_mul,eg_inv,eg0,eg1,eg2,eg3;
   
         if ( !current_ff )          if ( !current_ff )
                 error("powermodup : current_ff is not set");                  error("powermodup : current_ff is not set");
         field_order_ff(&n);          field_order_ff(&n);
         switch ( current_ff ) {          one_ff(&c);
                 case FF_GFP:  
                 case FF_GFPN:  
                         MKLM(ONEN,lm);  
                         c = (Num)lm;  
                         break;  
                 case FF_GFS:  
                         mqtogfs(ONEM,&fs);  
                         c = (Num)fs;  
                         break;  
                 default:  
                         error("powermodup : not implemented yet");  
         }  
         x = UPALLOC(1); x->d = 1; x->c[1] = c;          x = UPALLOC(1); x->d = 1; x->c[1] = c;
         y = UPALLOC(0); y->d = 0; y->c[0] = c;          y = UPALLOC(0); y->d = 0; y->c[0] = c;
   
Line 440  UP *xp;
Line 426  UP *xp;
                         uptolmup(s,&invf);                          uptolmup(s,&invf);
                         break;                          break;
                 case FF_GFS:                  case FF_GFS:
                   case FF_GFSN:
                         invf = s; /* XXX */                          invf = s; /* XXX */
                         break;                          break;
                 default:                  default:
Line 505  UP *xp;
Line 492  UP *xp;
         N e;          N e;
         UP x,y,t,invf,s;          UP x,y,t,invf,s;
         int k;          int k;
         LM lm;  
         GFS fs;  
         Num c;          Num c;
         struct oEGT eg_sq,eg_rem,eg_mul,eg_inv,eg0,eg1,eg2,eg3;          struct oEGT eg_sq,eg_rem,eg_mul,eg_inv,eg0,eg1,eg2,eg3;
   
         e = NM(d);          e = NM(d);
         switch ( current_ff ) {          one_ff(&c);
                 case FF_GFP:  
                 case FF_GFPN:  
                         MKLM(ONEN,lm);  
                         c = (Num)lm;  
                         break;  
                 case FF_GFS:  
                         mqtogfs(ONEM,&fs);  
                         c = (Num)fs;  
                         break;  
                 default:  
                         error("generic_powermodup : not implemented yet");  
         }  
         y = UPALLOC(0); y->d = 0; y->c[0] = c;          y = UPALLOC(0); y->d = 0; y->c[0] = c;
         remup(g,f,&x);          remup(g,f,&x);
         if ( !x ) {          if ( !x ) {
Line 582  UP *tab;
Line 555  UP *tab;
 {  {
         UP y,t,invf;          UP y,t,invf;
         int i,d;          int i,d;
         LM lm;  
         GFS fs;  
         Num c;          Num c;
         struct oEGT eg_rem,eg_mul,eg0,eg1,eg2;          struct oEGT eg_rem,eg_mul,eg0,eg1,eg2;
   
         d = f->d;          d = f->d;
         switch ( current_ff ) {          one_ff(&c);
                 case FF_GFP:  
                 case FF_GFPN:  
                         MKLM(ONEN,lm);  
                         c = (Num)lm;  
                         break;  
                 case FF_GFS:  
                         mqtogfs(ONEM,&fs);  
                         c = (Num)fs;  
                         break;  
                 default:  
                         error("powertabup : not implemented yet");  
         }  
         y = UPALLOC(0); y->d = 0; y->c[0] = c;          y = UPALLOC(0); y->d = 0; y->c[0] = c;
         tab[0] = y;          tab[0] = y;
         tab[1] = xp;          tab[1] = xp;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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