Changeset 92fab96 in git
- Timestamp:
- Jun 13, 2006, 3:39:02 PM (18 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- b859e37eb1c7f486aa9e47ec9868d29fd23e5339
- Parents:
- ffde366b5edf43184cdef9fba1212ec84b1b00c5
- Location:
- Singular
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rffde366 r92fab96 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.40 0 2006-05-30 07:28:20 Singular Exp $ */4 /* $Id: iparith.cc,v 1.401 2006-06-13 13:39:00 Singular Exp $ */ 5 5 6 6 /* … … 3737 3737 return FALSE; 3738 3738 } 3739 static BOOLEAN jjN2BI(leftv res, leftv v) 3740 { 3741 number n,i; i=(number)v->Data(); 3742 if (rField_is_Zp()) n=nlInit((int)(long)i); 3743 else if (rField_is_Q()) 3744 { 3745 if ((SR_HDL(i)&SR_INT)==SR_INT) n=nlInit((int)SR_TO_INT(i)); 3746 else if (i->s==3) n=nlCopy(i); 3747 else goto err; 3748 } 3749 else goto err; 3750 res->data=(void *)n; 3751 return FALSE; 3752 err: 3753 WerrorS("cannot convert to bigint"); return TRUE; 3754 } 3739 3755 static BOOLEAN jjNAMEOF(leftv res, leftv v) 3740 3756 { … … 4466 4482 ,{jjBETTI, BETTI_CMD, INTMAT_CMD, IDEAL_CMD ALLOW_PLURAL} 4467 4483 ,{jjBETTI, BETTI_CMD, INTMAT_CMD, MODUL_CMD ALLOW_PLURAL} 4484 ,{jjN2BI, BIGINT_CMD, NUMBER_CMD, BIGINT_CMD ALLOW_PLURAL} 4468 4485 ,{jjDUMMY, BIGINT_CMD, BIGINT_CMD, BIGINT_CMD ALLOW_PLURAL} 4469 4486 ,{jjCHAR, CHARACTERISTIC_CMD, INT_CMD, RING_CMD ALLOW_PLURAL} -
Singular/ipconv.cc
rffde366 r92fab96 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ipconv.cc,v 1.3 0 2006-06-13 10:21:00Singular Exp $ */4 /* $Id: ipconv.cc,v 1.31 2006-06-13 13:39:02 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: automatic type conversions … … 187 187 } 188 188 189 static void * iiN2BI(void *data)190 {191 number n,i; i=(number)data;192 if (rField_is_Zp()) n=nlInit((int)(long)data);193 else if (rField_is_Q())194 {195 if ((SR_HDL(i)&SR_INT)==SR_INT) n=nlInit((int)SR_TO_INT(i));196 else if (i->s==3) n=nlCopy(i);197 else { WerrorS("cannot convert to bigint"); n=nlInit(0); }198 }199 else { WerrorS("cannot convert to bigint"); n=nInit(0); }200 return (void *)n;201 }202 189 static void * iiN2P(void *data) 203 190 { … … 295 282 // number -> matrix 296 283 { NUMBER_CMD, MATRIX_CMD, iiN2Ma , NULL }, 297 // number -> bigint298 { NUMBER_CMD, BIGINT_CMD, iiN2P , NULL },299 284 // number -> ideal 300 285 // number -> vector
Note: See TracChangeset
for help on using the changeset viewer.