Changeset 6fc941 in git
- Timestamp:
- May 29, 2006, 6:10:50 PM (17 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 9f738e4e4d9a2396fedb4bf644b5fc7cbac460ad
- Parents:
- 7145030af0d072406bdbbd5f4cbd550cdea8ccba
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipconv.cc
r714503 r6fc941 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipconv.cc,v 1.2 8 2005-07-27 15:47:57Singular Exp $ */4 /* $Id: ipconv.cc,v 1.29 2006-05-29 16:10:50 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: automatic type conversions … … 17 17 #include "subexpr.h" 18 18 #include "numbers.h" 19 #include "modulop.h" 20 #include "longalg.h" 19 21 #include "matpol.h" 20 22 #include "silink.h" … … 96 98 return (void *)m; 97 99 } 100 static void * iiBI2N(void *d) 101 { 102 void *r=NULL; 103 if (rField_is_Q()) 104 r=d; 105 else 106 { 107 number n=(number)d; 108 if (rField_is_Zp()) 109 { 110 r=(void *)npMap0(n); 111 } 112 else if (rField_is_Q_a()) 113 { 114 r=(void *)naMap00(n); 115 } 116 else if (rField_is_Zp_a()) 117 { 118 r=(void *)naMap0P(n); 119 } 120 else 121 WerrorS("cannot convert bigint to this field"); 122 nlDelete(&n,NULL); 123 } 124 return r; 125 } 126 127 static void * iiN2P(void *data); 128 static void * iiBI2P(void *d) 129 { 130 void *r=iiBI2N(d); 131 if(errorreported) return NULL; 132 else return iiN2P(r); 133 } 98 134 99 135 static void * iiDummy(void *data) … … 124 160 { 125 161 number n=nInit((int)(long)data); 162 return (void *)n; 163 } 164 165 static void * iiI2BI(void *data) 166 { 167 number n=nlInit((int)(long)data); 126 168 return (void *)n; 127 169 } … … 211 253 { 212 254 // input type output type convert procedure 255 // int -> bigint 256 { INT_CMD, BIGINT_CMD, iiI2BI , NULL }, 213 257 // int -> number 214 258 { INT_CMD, NUMBER_CMD, iiI2N , NULL }, … … 229 273 // intmat -> matrix 230 274 { INTMAT_CMD, MATRIX_CMD, iiIm2Ma , NULL }, 275 // bigint -> number 276 { BIGINT_CMD, NUMBER_CMD, iiBI2N , NULL }, 277 // bigint -> poly 278 { BIGINT_CMD, NUMBER_CMD, iiBI2P , NULL }, 231 279 // number -> poly 232 280 { NUMBER_CMD, POLY_CMD, iiN2P , NULL }, -
Singular/ipid.cc
r714503 r6fc941 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipid.cc,v 1.7 4 2006-05-29 15:14:29Singular Exp $ */4 /* $Id: ipid.cc,v 1.75 2006-05-29 16:10:50 Singular Exp $ */ 5 5 6 6 /* … … 251 251 case BIGINT_CMD: 252 252 IDNUMBER(h) = nlInit(0); 253 253 break; 254 254 case IDEAL_CMD: 255 255 case MODUL_CMD: … … 342 342 { 343 343 goto errlabel; 344 } 344 } 345 345 if (BVERBOSE(V_REDEFINE)) 346 346 Warn("redefining %s **",s); … … 717 717 if (h2!=NULL) return h2; 718 718 if (h!=NULL) return h; 719 #ifdef HAVE_NS 719 #ifdef HAVE_NS 720 720 if (basePack!=currPack) 721 721 return basePack->idroot->get(n,myynest); 722 #endif 723 return NULL; 722 #endif 723 return NULL; 724 724 } 725 725 … … 727 727 { 728 728 if (hasFlag(h,FLAG_STD)) PrintS(" (SB)"); 729 #ifdef HAVE_PLURAL 729 #ifdef HAVE_PLURAL 730 730 if (hasFlag(h,FLAG_TWOSTD)) PrintS(" (2SB)"); 731 #endif 731 #endif 732 732 } 733 733
Note: See TracChangeset
for help on using the changeset viewer.