[BACK]Return to ca.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / include

Diff for /OpenXM_contrib2/asir2018/include/ca.h between version 1.3 and 1.4

version 1.3, 2018/09/24 22:26:43 version 1.4, 2018/09/28 08:20:29
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/asir2018/include/ca.h,v 1.2 2018/09/21 07:06:51 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/include/ca.h,v 1.3 2018/09/24 22:26:43 noro Exp $
 */  */
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 771  typedef unsigned int ModNum;
Line 771  typedef unsigned int ModNum;
 #define COEF(p) ((p)->c)  #define COEF(p) ((p)->c)
 #define DEG(p) ((p)->d)  #define DEG(p) ((p)->d)
 #define CONT(a) ((a)->cont)  #define CONT(a) ((a)->cont)
 #define UDEG(f) QTOS(DEG(DC(f)))  #define UDEG(f) ZTOS(DEG(DC(f)))
 #define UCOEF(f) (COEF(DC(f)))  #define UCOEF(f) (COEF(DC(f)))
 #define LC(f) (NUM(f)?(f):COEF(DC(f)))  #define LC(f) (NUM(f)?(f):COEF(DC(f)))
   
Line 978  if(!(r)){NEWDMM(r);(c)=(r);}else{NEWDMM(NEXT(c));(c)=N
Line 978  if(!(r)){NEWDMM(r);(c)=(r);}else{NEWDMM(NEXT(c));(c)=N
 #define DUPZ(p,q) (NEWZ(q),BDY(q)=BDY(p))  #define DUPZ(p,q) (NEWZ(q),BDY(q)=BDY(p))
 #define DUPQ(p,q) (NEWQ(q),BDY(q)=BDY(p))  #define DUPQ(p,q) (NEWQ(q),BDY(q)=BDY(p))
   
 #define STOQ(n,q) ((!(n))?((q)=0):(NEWZ(q),mpz_set_si(BDY(q),n)))  #define STOZ(n,q) ((!(n))?((q)=0):(NEWZ(q),mpz_set_si(BDY(q),n)))
 #define UTOQ(n,q) ((!(n))?((q)=0):(NEWZ(q),mpz_set_ui(BDY(q),n)))  #define UTOZ(n,q) ((!(n))?((q)=0):(NEWZ(q),mpz_set_ui(BDY(q),n)))
   
 /* for initializing static object */  /* for initializing static object */
 #define STOQ0(n,q) (OID(q)=O_N,NID(q)=N_Q,(q)->z=1,mpz_init(BDY(q)),mpz_set_si(BDY(q),n))  #define STOZ0(n,q) (OID(q)=O_N,NID(q)=N_Q,(q)->z=1,mpz_init(BDY(q)),mpz_set_si(BDY(q),n))
 #define STOLM0(n,q) (OID(q)=O_N,NID(q)=N_LM,mpz_init(BDY(q)),mpz_set_si(BDY(q),n))  #define STOLM0(n,q) (OID(q)=O_N,NID(q)=N_LM,mpz_init(BDY(q)),mpz_set_si(BDY(q),n))
   
 #define QTOS(q) (!(q)?0:((q)->z==1?mpz_get_si(BDY((Z)q)):(error("QTOS : invalid argument"),0)))  #define ZTOS(q) (!(q)?0:((q)->z==1?mpz_get_si(BDY((Z)q)):(error("ZTOS : invalid argument"),0)))
 #define LMTOS(q) (!(q)?0:mpz_get_si(BDY(q)))  #define LMTOS(q) (!(q)?0:mpz_get_si(BDY(q)))
   
 #define UTOMQ(a,b) ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))  #define UTOMQ(a,b) ((a)?(NEWMQ(b),CONT(b)=(unsigned int)(a),(b)):((b)=0))

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

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