Changeset b8f3d2 in git
- Timestamp:
- Jul 14, 2006, 6:53:57 PM (18 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a239a9779b8d405af74fa608d28473247c5dd510
- Parents:
- c8cb6eecf51c0f874cb455274377c7bd4fbf342b
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rc8cb6e rb8f3d2 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.40 4 2006-06-30 16:07:54Singular Exp $ */4 /* $Id: iparith.cc,v 1.405 2006-07-14 16:53:55 Singular Exp $ */ 5 5 6 6 /* … … 3692 3692 return FALSE; 3693 3693 } 3694 #if SIZEOF_LONG == 8 3695 static number jjBI2N(long d); 3696 #else 3697 #define jjBI2N(D) nlInit((int)D) 3698 #endif 3694 3699 static BOOLEAN jjMEMORY(leftv res, leftv v) 3695 3700 { 3696 3701 omUpdateInfo(); 3702 long d; 3697 3703 switch(((int)(long)v->Data())) 3698 3704 { 3699 3705 case 0: 3700 res->data = (char *)om_Info.UsedBytes;3706 res->data=(char *)jjBI2N(om_Info.UsedBytes); 3701 3707 break; 3702 3708 case 1: 3703 res->data = (char *) om_Info.CurrentBytesSystem;3709 res->data = (char *)jjBI2N(om_Info.CurrentBytesSystem); 3704 3710 break; 3705 3711 case 2: 3706 res->data = (char *) om_Info.MaxBytesSystem;3712 res->data = (char *)jjBI2N(om_Info.MaxBytesSystem); 3707 3713 break; 3708 3714 … … 3712 3718 omPrintBinStats(stdout); 3713 3719 res->data = (char *)0; 3720 res->rtyp = NONE; 3714 3721 } 3715 3722 return FALSE; … … 3717 3724 return FALSE; 3718 3725 } 3726 #if SIZEOF_LONG == 8 3727 static number jjBI2N(long d) 3728 { 3729 if (d<((long)INT_MAX)) return nlInit((int)d); 3730 else 3731 { 3732 number n=nlRInit(0); 3733 mpz_set_si(&n->z,d); 3734 return n; 3735 } 3736 } 3737 #endif 3719 3738 static BOOLEAN jjMONITOR1(leftv res, leftv v) 3720 3739 { … … 4625 4644 ,{jjDUMMY, MATRIX_CMD, MATRIX_CMD, MATRIX_CMD ALLOW_PLURAL} 4626 4645 ,{jjidMaxIdeal, MAXID_CMD, XS(IDEAL_CMD), INT_CMD ALLOW_PLURAL} 4627 ,{jjMEMORY, MEMORY_CMD, INT_CMD,INT_CMD ALLOW_PLURAL}4646 ,{jjMEMORY, MEMORY_CMD, BIGINT_CMD, INT_CMD ALLOW_PLURAL} 4628 4647 ,{jjidMinBase, MINBASE_CMD, XS(IDEAL_CMD), IDEAL_CMD NO_PLURAL} 4629 4648 ,{jjidMinBase, MINBASE_CMD, XS(MODUL_CMD), MODUL_CMD NO_PLURAL}
Note: See TracChangeset
for help on using the changeset viewer.