/[gcl]/gcl/h/mp.h
ViewVC logotype

Diff of /gcl/h/mp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6.6.1 by camm, Sat Sep 27 16:09:48 2003 UTC revision 1.6.6.1.12.1 by camm, Sat Jan 15 16:27:36 2005 UTC
# Line 61  typedef struct Line 61  typedef struct
61     action \     action \
62     ((((CMPt1=(x))+1024)&-2048)==0?small_fixnum(CMPt1):make_fixnum1(CMPt1));}while(0)     ((((CMPt1=(x))+1024)&-2048)==0?small_fixnum(CMPt1):make_fixnum1(CMPt1));}while(0)
63            
64    #define ineg(a_) (sizeof(a_)==sizeof(unsigned) ? (unsigned)-(a_) : (unsigned long)-(a_))
65    
66  #define addii mpz_add  #define addii mpz_add
67  #define addsi(u,a,b) (a >= 0 ?  mpz_add_ui(u,b,a) : mpz_sub_ui(u,b,-a))  #define addsi(u,a,b) (a >= 0 ?  mpz_add_ui(u,b,a) : mpz_sub_ui(u,b,ineg(a)))
68  #define addss(u,a,b) addsi(u,a,SI_TO_MP(b,big_fixnum1))  #define addss(u,a,b) addsi(u,a,SI_TO_MP(b,big_fixnum1))
69                            
70  #define mulii mpz_mul  #define mulii mpz_mul
# Line 71  typedef struct Line 73  typedef struct
73                            
74  #define subii mpz_sub  #define subii mpz_sub
75  #define subsi(u,a,b) mpz_sub(u,SI_TO_MP(a,big_fixnum1),b)  #define subsi(u,a,b) mpz_sub(u,SI_TO_MP(a,big_fixnum1),b)
76  #define subis(u,a,b) (b >= 0 ?  mpz_sub_ui(u,a,b) : mpz_add_ui(u,a,-b))  #define subis(u,a,b) (b >= 0 ?  mpz_sub_ui(u,a,b) : mpz_add_ui(u,a,ineg(b)))
77  #define subss(u,a,b) subis(u,SI_TO_MP(a,big_fixnum1),b)  #define subss(u,a,b) subis(u,SI_TO_MP(a,big_fixnum1),b)
78  #define shifti(u,a,w) (w>=0 ? mpz_mul_2exp(u,a,w) : mpz_fdiv_q_2exp(u,MP(x),-w))  #define shifti(u,a,w) (w>=0 ? mpz_mul_2exp(u,a,w) : mpz_fdiv_q_2exp(u,MP(x),ineg(w)))
79    
80    
81    

Legend:
Removed from v.1.6.6.1  
changed lines
  Added in v.1.6.6.1.12.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26