// CPosBigInt07.cpp
// 02/16/2004
// Author: AOU
/*
Implement very long positive integers and
simple operations associated with them
a="12000000000001111111111113"
b="62222222222222222222222222222222222223"
c = a+b
*/
//////////////////////////////////////////////////////////////////////
// include files
//////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
//////////////////////////////////////////////////////////////////////
// constants
//////////////////////////////////////////////////////////////////////
const int MAX_DIGITS = 50;
const int TEST_COUNT = 20;
const char *TEST_DATA[] =
{
"0", "1", "12", "123", "1234", "123450", "1234506", "12345067",
"123450670", "1234506708", "1234506708", "Hello", "PSU",
"9", "99", "999", "9999", "99999", "999999", "9999999"
"10", "200", "3000", "40000", "500000", "6000000", "70000000",
"800000000", "9000000000", "1090000000000", "11900000000000",
"129000000000000", "1390000000000000", "14900000000000000"
};
const int TEST_DATA_COUNT = sizeof(TEST_DATA)/sizeof(TEST_DATA[0]);
//////////////////////////////////////////////////////////////////////
// class CPosBigInt
//////////////////////////////////////////////////////////////////////
class CPosBigInt
{
private:
char _digits[MAX_DIGITS];
void initialize(void);
public:
CPosBigInt(void);
void display(void);
CPosBigInt(char d[]); // 2004.01.28
CPosBigInt(char ch); // p02 A:2004.01.30, P:2004.02.11
void displayMinimized(void); // p02 A:2004.01.30, P:2004.02.11
bool shiftLeft(void); // 2004.02.02
friend void add(CPosBigInt x, CPosBigInt y, CPosBigInt &z); // 2004.02.09
void displayScientific(void); // p03 A:2004.02.11
CPosBigInt(short int x); // 2004.02.16
// [SHRT_MIN, SHRT_MAX] = [-32767,32767]
CPosBigInt(unsigned short int x); // 2004.02.16
// [0, USHRT_MAX] = [0, 65535]
CPosBigInt(long int x); // 2004.02.16
// [LONG_MIN, LONG_MAX] = [-2147483647, 2147483647]
CPosBigInt(unsigned long int x); // 2004.02.16
// [0, ULONG_MAX] = [0, 4294967295]
void displayRev(void); //
//wish list
// shiftRight Matt
// subtract (-) Chad
// multiply (*) Brian
// divide (/) Grant
// input >> Alex
// negate Tony1
// square root Aifu
// average of array Bill
// factorial Christine
// output << Tony2
// sort Yeh
// construct from short, unsigned short, long, unsigned long
};
//////////////////////////////////////////////////////////////////////
// friend functions prototypes
//////////////////////////////////////////////////////////////////////
void add(CPosBigInt x, CPosBigInt y, CPosBigInt &z);
//////////////////////////////////////////////////////////////////////
// driver prototypes
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_Str(void);
void driver_CPosBigInt_Constructor_Rand(void);
void driver_CPosBigInt_displayMinimized(void);
void driver_CPosBigInt_shiftLeft(void);
void driver_CPosBigInt_add(void);
void driver_CPosBigInt_displayScientific(void);
void driver_CPosBigInt_Constructor_ShortInt(void);
void driver_CPosBigInt_Constructor_UnsignedShortInt(void);
void driver_CPosBigInt_Constructor_LongInt(void);
void driver_CPosBigInt_Constructor_UnsignedLongInt(void);
//////////////////////////////////////////////////////////////////////
// void main(void)
//////////////////////////////////////////////////////////////////////
void main(void)
{
//driver_CPosBigInt_Constructor_Str();
//driver_CPosBigInt_Constructor_Rand();
//driver_CPosBigInt_displayMinimized();
//driver_CPosBigInt_shiftLeft();
//driver_CPosBigInt_add();
//driver_CPosBigInt_displayScientific();
driver_CPosBigInt_Constructor_ShortInt();
driver_CPosBigInt_Constructor_UnsignedShortInt();
driver_CPosBigInt_Constructor_LongInt();
driver_CPosBigInt_Constructor_UnsignedLongInt();
/*
cout << "// [SHRT_MIN, SHRT_MAX] = [-32767,32767]\n";
cout << "[" << SHRT_MIN << ", " << SHRT_MAX << "]\n";
cout << "// [0, USHRT_MAX] = [0, 65535]\n";
cout << "[" << 0 << ", " << USHRT_MAX << "]\n";
cout << "// [LONG_MIN, LONG_MAX] = [-2147483647, 2147483647]\n";
cout << "[" << LONG_MIN << ", " << LONG_MAX << "]\n";
cout << "// [0, ULONG_MAX] = [0, 4294967295]\n";
cout << "[" << 0 << ", " << ULONG_MAX << "]\n";
*/
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_UnsignedLongInt(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_UnsignedLongInt(void)
{
cout << "---------------------------------------------\n";
cout << "driver_CPosBigInt_Constructor_UnsignedLongInt\n";
cout << "---------------------------------------------\n";
unsigned long int x;
for (int i=0; i<=TEST_COUNT-1; i++)
{
x = rand()%ULONG_MAX;
x = 2*x;
x = x*x;
CPosBigInt a(x);
cout << "After CPosBigInt a(" << x << ");\n";
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(unsigned long int x)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Construct a big integer from a unsigned long integer
Example: CPosBigInt a(123) => a="000123"
Algorithm0:
initialize
get the last digit from x and put it in d
put d in the last position of digits[]
continue the same while going to the left
until no more digits in x
Algorithm1:
initialize
while x > 0
d = x%10
if d <> 0 then
put d in digits[] at the proper place
x = x/10
Algorithm2:
initialize
p = MAX_DIGITS-1
while x > 0
d = x%10
if d <> 0 then
convert and put d in digits[] at the proper(p) place
x = x/10
p--
end while
*/
CPosBigInt::CPosBigInt(unsigned long int x)
{
initialize();
int p = MAX_DIGITS-1;
while (x > 0)
{
int d = x%10;
if (d != 0)
_digits[p] = '0' + d;
x = x/10;
p--;
}
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_LongInt(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_LongInt(void)
{
cout << "-------------------------------------\n";
cout << "driver_CPosBigInt_Constructor_LongInt\n";
cout << "-------------------------------------\n";
long int x;
for (int i=0; i<=TEST_COUNT-1; i++)
{
x = rand()%LONG_MAX;
x = x * x;
CPosBigInt a(x);
cout << "After CPosBigInt a(" << x << ");\n";
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(long int x)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Construct a big integer from a long integer
Example: CPosBigInt a(123) => a="000123"
Algorithm0:
initialize
get the last digit from x and put it in d
put d in the last position of digits[]
continue the same while going to the left
until no more digits in x
Algorithm1:
initialize
while x > 0
d = x%10
if d <> 0 then
put d in digits[] at the proper place
x = x/10
Algorithm2:
initialize
p = MAX_DIGITS-1
while x > 0
d = x%10
if d <> 0 then
convert and put d in digits[] at the proper(p) place
x = x/10
p--
end while
*/
CPosBigInt::CPosBigInt(long int x)
{
initialize();
int p = MAX_DIGITS-1;
while (x > 0)
{
int d = x%10;
if (d != 0)
_digits[p] = '0' + d;
x = x/10;
p--;
}
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_UnsignedShortInt(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_UnsignedShortInt(void)
{
cout << "----------------------------------------------\n";
cout << "driver_CPosBigInt_Constructor_UnsignedShortInt\n";
cout << "----------------------------------------------\n";
unsigned short int x;
for (int i=0; i<=TEST_COUNT-1; i++)
{
x = rand()%USHRT_MAX;
x = 2*x;
CPosBigInt a(x);
cout << "After CPosBigInt a(" << x << ");\n";
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(unsigned short int x)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Construct a big integer from a short unsigned integer
Example: CPosBigInt a(123) => a="000123"
Algorithm0:
initialize
get the last digit from x and put it in d
put d in the last position of digits[]
continue the same while going to the left
until no more digits in x
Algorithm1:
initialize
while x > 0
d = x%10
if d <> 0 then
put d in digits[] at the proper place
x = x/10
Algorithm2:
initialize
p = MAX_DIGITS-1
while x > 0
d = x%10
if d <> 0 then
convert and put d in digits[] at the proper(p) place
x = x/10
p--
end while
*/
CPosBigInt::CPosBigInt(unsigned short int x)
{
initialize();
int p = MAX_DIGITS-1;
while (x > 0)
{
int d = x%10;
if (d != 0)
_digits[p] = '0' + d;
x = x/10;
p--;
}
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_ShortInt(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_ShortInt(void)
{
cout << "--------------------------------------\n";
cout << "driver_CPosBigInt_Constructor_ShortInt\n";
cout << "--------------------------------------\n";
short int x;
for (int i=0; i<=TEST_COUNT-1; i++)
{
x = rand()%SHRT_MAX;
CPosBigInt a(x);
cout << "After CPosBigInt a(" << x << ");\n";
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(short int x)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Construct a big integer from a short integer
Example: CPosBigInt a(123) => a="000123"
Algorithm0:
initialize
get the last digit from x and put it in d
put d in the last position of digits[]
continue the same while going to the left
until no more digits in x
Algorithm1:
initialize
while x > 0
d = x%10
if d <> 0 then
put d in digits[] at the proper place
x = x/10
Algorithm2:
initialize
p = MAX_DIGITS-1
while x > 0
d = x%10
if d <> 0 then
convert and put d in digits[] at the proper(p) place
x = x/10
p--
end while
*/
CPosBigInt::CPosBigInt(short int x)
{
initialize();
int p = MAX_DIGITS-1;
while (x > 0)
{
int d = x%10;
if (d != 0)
_digits[p] = '0' + d;
x = x/10;
p--;
}
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_displayScientific(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_displayScientific(void)
{
cout << "-----------------------------------\n";
cout << "driver_CPosBigInt_displayScientific\n";
cout << "-----------------------------------\n";
for (int i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt x('d');
cout << "x="; x.display();
cout << "x="; x.displayScientific();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// void CPosBigInt::displayScientific(void)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Display big integers in scientific notation
Example: 000010000000 => 1E7
000120000000 => 12E7
000001230000 => 123E4
100000000000 => 1E11
000000000000 => 0E0
000000000001 => 1E0
Algorithm0:
Supply algorithm
*/
void CPosBigInt::displayScientific(void)
{
cout << "Code missing\n";
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_add(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_add(void)
{
cout << "---------------------\n";
cout << "driver_CPosBigInt_add\n";
cout << "---------------------\n";
for (int i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt x('d'), y('d'), z('d');
cout << "x="; x.display();
cout << "y="; y.display();
cout << "z="; z.display();
add(x, y, z);
cout << "After add(x, y, z);\n";
cout << "x="; x.display();
cout << "y="; y.display();
cout << "z="; z.display();
}
for (i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt x('r'), y('r'), z('r');
cout << "x="; x.display();
cout << "y="; y.display();
cout << "z="; z.display();
add(x, y, z);
cout << "After add(x, y, z);\n";
cout << "x="; x.display();
cout << "y="; y.display();
cout << "z="; z.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// void add(CPosBigInt x, CPosBigInt y, CPosBigInt z)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Add the values of x and y and put result in z
Example: x=1234, y=67 => z=1301
Algorithm0:
Initialize z to zero
c = 0
for i= MAX_DIGITS-1 to 0 do the following
sum = x.digits[i] + y.digits[i] + c
d = sum%10
c = sum/10
z.digits[i]=d
end for
*/
void add(CPosBigInt x, CPosBigInt y, CPosBigInt &z)
{
z.initialize();
int c = 0, d, sum;
for (int i= MAX_DIGITS-1; i>=0; i--)
{
sum = (x._digits[i]-'0') + (y._digits[i]-'0') + c;
d = sum%10;
c = sum/10;
z._digits[i]='0'+ d;
}
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_shiftLeft(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_shiftLeft(void)
{
cout << "---------------------------\n";
cout << "driver_CPosBigInt_shiftLeft\n";
cout << "----------------------------\n";
for (int i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt a('d');
cout << "a="; a.display();
a.shiftLeft();
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// bool CPosBigInt::shiftLeft(void)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Shift left all the digits
Example: '00012' => '00120'
Algorithm:
if the first digit is non-zero then
overflow = true
else
overflow = false
for i=1 to MAX_DIGITS-1
digits[i] = digits[i+1]
end for
digits[MAX_DIGITS-1] = '0'
return not(overflow)
*/
bool CPosBigInt::shiftLeft(void)
{
bool overflow;
if (_digits[0] != '0')
overflow = true;
else
overflow = false;
for (int i=1; i<=MAX_DIGITS-1; i++)
_digits[i] = _digits[i+1];
_digits[MAX_DIGITS-1] = '0';
return !overflow;
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_displayMinimized(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_displayMinimized(void)
{
cout << "----------------------------------\n";
cout << "driver_CPosBigInt_displayMinimized\n";
cout << "----------------------------------\n";
for (int i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt a('r');
cout << "a="; a.display();
cout << "a="; a.displayMinimized();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// void CPosBigInt::displayMinimized(void)
//////////////////////////////////////////////////////////////////////
/*
Purpose: Display a big integer in minimized form (without leading zeros)
Examples: 000000123 will be displayed as 123
Algorithm:
do the following for i=0 to MAX_DIGITS-2
if digits[i] != '0' then
startPrint = i
exit loop
end if
end do
do the following for i=startPrint to MAX_DIGITS-1
display digits[i]
end do
*/
void CPosBigInt::displayMinimized(void)
{
int startPrint;
for (int i=0; i<=MAX_DIGITS-2; i++)
{
if (_digits[i] != '0')
{
startPrint = i;
break;
}
}
for (i=startPrint; i<=MAX_DIGITS-1; i++)
cout << _digits[i];
cout << endl;
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_Rand(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_Rand(void)
{
cout << "----------------------------------\n";
cout << "driver_CPosBigInt_Constructor_Rand\n";
cout << "----------------------------------\n";
for (int i=0; i<=TEST_COUNT-1; i++)
{
CPosBigInt a('r');
cout << "a="; a.display();
cout << "----------------------------------------------------\n";
}
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(char ch)
//////////////////////////////////////////////////////////////////////
/*
Purpose: A constructor to create a random big integer
Examples: CPosBigInt x('r'); could give x=667621
Algorithm:
initialize all digits with zeros
set leadingZeros to a random number between 0 and MAX_DIGITS;
do the following for i=leadingZeros to MAX_DIGITS-1
d = random integer between 0 and 9
c = random character betwwe '0' to '9' using d
digits[i] = c
end do
*/
CPosBigInt::CPosBigInt(char ch)
{
initialize();
if ('r' == ch)
{
int leadingZeros = rand()%(MAX_DIGITS+1);
for (int i=0; i<=MAX_DIGITS-1; i++)
{
char c;
if (i < leadingZeros)
c = '0';
else
c = '0' + rand()%10;
_digits[i] = c;
}
}
if ('d' == ch)
{
int k = rand()%TEST_DATA_COUNT;
int len = strlen(TEST_DATA[k]);
for (int j=0; j<=len-1; j++)
if (TEST_DATA[k][j] < '0' || TEST_DATA[k][j] >'9')
return;
for (int i=0; i<=len-1; i++)
_digits[MAX_DIGITS-len+i] = TEST_DATA[k][i];
}
if ('z' == ch)
{
// create a random big integer from test data
// with lots of leading and trailing zeros
// fully contained
// Rough plan:
// initialize with zeros
// pick a spot randomly so that TEST_DATA[k] would be fully contained
// put the TEST_DATA[k] starting at that point
}
}
//////////////////////////////////////////////////////////////////////
// void CPosBigInt::initialize(void)
//////////////////////////////////////////////////////////////////////
/*
Initializes a big integer with zeros
*/
void CPosBigInt::initialize(void)
{
for (int i=0; i<MAX_DIGITS; i++)
_digits[i] = '0';
}
//////////////////////////////////////////////////////////////////////
// void driver_CPosBigInt_Constructor_Str(void)
//////////////////////////////////////////////////////////////////////
void driver_CPosBigInt_Constructor_Str(void)
{
cout << "---------------------------------\n";
cout << "driver_CPosBigInt_Constructor_Str\n";
cout << "---------------------------------\n";
CPosBigInt a("1234");
cout << "a="; a.display();
CPosBigInt b("12");
cout << "b="; b.display();
CPosBigInt c("Hello");
cout << "c="; c.display();
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(char d[])
//////////////////////////////////////////////////////////////////////
/*
A constructor that takes a character array and
creates and initializes a big integer
CPosBigInt a("12345");
will create object a with value 12345
"12345"
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000012345
Algorithm:
fill digits with zeros
for
len = length of a[]
digits[MAX_DIGITS-len] = d[0]
digits[MAX_DIGITS-len+1] = d[1]
digits[MAX_DIGITS-len+2] = d[2]
digits[MAX_DIGITS-len+3] = d[3]
digits[MAX_DIGITS-len+4] = d[4]
for i=0 to len-1
digits[MAX_DIGITS-len+i] = d[i]
*/
CPosBigInt::CPosBigInt(char d[])
{
initialize();
int len = strlen(d);
for (int j=0; j<=len-1; j++)
if (d[j] < '0' || d[j] >'9')
return;
for (int i=0; i<=len-1; i++)
_digits[MAX_DIGITS-len+i] = d[i];
}
//////////////////////////////////////////////////////////////////////
// CPosBigInt::CPosBigInt(void)
//////////////////////////////////////////////////////////////////////
CPosBigInt::CPosBigInt(void)
{
initialize();
};
//////////////////////////////////////////////////////////////////////
// void CPosBigInt::display(void)
//////////////////////////////////////////////////////////////////////
void CPosBigInt::display(void)
{
for (int i=0; i<MAX_DIGITS; i++)
cout << _digits[i];
cout << endl;
};
//////////////////////////////////////////////////////////////////////
// SAMPLE OUTPUT:
//////////////////////////////////////////////////////////////////////
/*
--------------------------------------
driver_CPosBigInt_Constructor_ShortInt
--------------------------------------
After CPosBigInt a(41);
a=00000000000000000000000000000000000000000000000041
----------------------------------------------------
After CPosBigInt a(18467);
a=00000000000000000000000000000000000000000000018467
----------------------------------------------------
After CPosBigInt a(6334);
a=00000000000000000000000000000000000000000000006334
----------------------------------------------------
After CPosBigInt a(26500);
a=00000000000000000000000000000000000000000000026500
----------------------------------------------------
After CPosBigInt a(19169);
a=00000000000000000000000000000000000000000000019169
----------------------------------------------------
After CPosBigInt a(15724);
a=00000000000000000000000000000000000000000000015724
----------------------------------------------------
After CPosBigInt a(11478);
a=00000000000000000000000000000000000000000000011478
----------------------------------------------------
After CPosBigInt a(29358);
a=00000000000000000000000000000000000000000000029358
----------------------------------------------------
After CPosBigInt a(26962);
a=00000000000000000000000000000000000000000000026962
----------------------------------------------------
After CPosBigInt a(24464);
a=00000000000000000000000000000000000000000000024464
----------------------------------------------------
After CPosBigInt a(5705);
a=00000000000000000000000000000000000000000000005705
----------------------------------------------------
After CPosBigInt a(28145);
a=00000000000000000000000000000000000000000000028145
----------------------------------------------------
After CPosBigInt a(23281);
a=00000000000000000000000000000000000000000000023281
----------------------------------------------------
After CPosBigInt a(16827);
a=00000000000000000000000000000000000000000000016827
----------------------------------------------------
After CPosBigInt a(9961);
a=00000000000000000000000000000000000000000000009961
----------------------------------------------------
After CPosBigInt a(491);
a=00000000000000000000000000000000000000000000000491
----------------------------------------------------
After CPosBigInt a(2995);
a=00000000000000000000000000000000000000000000002995
----------------------------------------------------
After CPosBigInt a(11942);
a=00000000000000000000000000000000000000000000011942
----------------------------------------------------
After CPosBigInt a(4827);
a=00000000000000000000000000000000000000000000004827
----------------------------------------------------
After CPosBigInt a(5436);
a=00000000000000000000000000000000000000000000005436
----------------------------------------------------
----------------------------------------------
driver_CPosBigInt_Constructor_UnsignedShortInt
----------------------------------------------
After CPosBigInt a(64782);
a=00000000000000000000000000000000000000000000064782
----------------------------------------------------
After CPosBigInt a(29208);
a=00000000000000000000000000000000000000000000029208
----------------------------------------------------
After CPosBigInt a(7804);
a=00000000000000000000000000000000000000000000007804
----------------------------------------------------
After CPosBigInt a(306);
a=00000000000000000000000000000000000000000000000306
----------------------------------------------------
After CPosBigInt a(584);
a=00000000000000000000000000000000000000000000000584
----------------------------------------------------
After CPosBigInt a(24764);
a=00000000000000000000000000000000000000000000024764
----------------------------------------------------
After CPosBigInt a(34842);
a=00000000000000000000000000000000000000000000034842
----------------------------------------------------
After CPosBigInt a(37432);
a=00000000000000000000000000000000000000000000037432
----------------------------------------------------
After CPosBigInt a(39436);
a=00000000000000000000000000000000000000000000039436
----------------------------------------------------
After CPosBigInt a(39790);
a=00000000000000000000000000000000000000000000039790
----------------------------------------------------
After CPosBigInt a(10894);
a=00000000000000000000000000000000000000000000010894
----------------------------------------------------
After CPosBigInt a(43452);
a=00000000000000000000000000000000000000000000043452
----------------------------------------------------
After CPosBigInt a(29542);
a=00000000000000000000000000000000000000000000029542
----------------------------------------------------
After CPosBigInt a(23076);
a=00000000000000000000000000000000000000000000023076
----------------------------------------------------
After CPosBigInt a(3738);
a=00000000000000000000000000000000000000000000003738
----------------------------------------------------
After CPosBigInt a(39824);
a=00000000000000000000000000000000000000000000039824
----------------------------------------------------
After CPosBigInt a(51334);
a=00000000000000000000000000000000000000000000051334
----------------------------------------------------
After CPosBigInt a(52598);
a=00000000000000000000000000000000000000000000052598
----------------------------------------------------
After CPosBigInt a(34070);
a=00000000000000000000000000000000000000000000034070
----------------------------------------------------
After CPosBigInt a(19788);
a=00000000000000000000000000000000000000000000019788
----------------------------------------------------
-------------------------------------
driver_CPosBigInt_Constructor_LongInt
-------------------------------------
After CPosBigInt a(823862209);
a=00000000000000000000000000000000000000000823862209
----------------------------------------------------
After CPosBigInt a(566963721);
a=00000000000000000000000000000000000000000566963721
----------------------------------------------------
After CPosBigInt a(981067684);
a=00000000000000000000000000000000000000000981067684
----------------------------------------------------
After CPosBigInt a(920090889);
a=00000000000000000000000000000000000000000920090889
----------------------------------------------------
After CPosBigInt a(312334929);
a=00000000000000000000000000000000000000000312334929
----------------------------------------------------
After CPosBigInt a(21752896);
a=00000000000000000000000000000000000000000021752896
----------------------------------------------------
After CPosBigInt a(229249881);
a=00000000000000000000000000000000000000000229249881
----------------------------------------------------
After CPosBigInt a(59459521);
a=00000000000000000000000000000000000000000059459521
----------------------------------------------------
After CPosBigInt a(798232009);
a=00000000000000000000000000000000000000000798232009
----------------------------------------------------
After CPosBigInt a(47169424);
a=00000000000000000000000000000000000000000047169424
----------------------------------------------------
After CPosBigInt a(652649209);
a=00000000000000000000000000000000000000000652649209
----------------------------------------------------
After CPosBigInt a(764190736);
a=00000000000000000000000000000000000000000764190736
----------------------------------------------------
After CPosBigInt a(1066806244);
a=00000000000000000000000000000000000000001066806244
----------------------------------------------------
After CPosBigInt a(1073021049);
a=00000000000000000000000000000000000000001073021049
----------------------------------------------------
After CPosBigInt a(401481369);
a=00000000000000000000000000000000000000000401481369
----------------------------------------------------
After CPosBigInt a(165353881);
a=00000000000000000000000000000000000000000165353881
----------------------------------------------------
After CPosBigInt a(76090729);
a=00000000000000000000000000000000000000000076090729
----------------------------------------------------
After CPosBigInt a(94887081);
a=00000000000000000000000000000000000000000094887081
----------------------------------------------------
After CPosBigInt a(757845841);
a=00000000000000000000000000000000000000000757845841
----------------------------------------------------
After CPosBigInt a(605284);
a=00000000000000000000000000000000000000000000605284
----------------------------------------------------
---------------------------------------------
driver_CPosBigInt_Constructor_UnsignedLongInt
---------------------------------------------
After CPosBigInt a(606735424);
a=00000000000000000000000000000000000000000606735424
----------------------------------------------------
After CPosBigInt a(36844900);
a=00000000000000000000000000000000000000000036844900
----------------------------------------------------
After CPosBigInt a(1969584400);
a=00000000000000000000000000000000000000001969584400
----------------------------------------------------
After CPosBigInt a(13571856);
a=00000000000000000000000000000000000000000013571856
----------------------------------------------------
After CPosBigInt a(331776);
a=00000000000000000000000000000000000000000000331776
----------------------------------------------------
After CPosBigInt a(3625484944);
a=00000000000000000000000000000000000000003625484944
----------------------------------------------------
After CPosBigInt a(326886400);
a=00000000000000000000000000000000000000000326886400
----------------------------------------------------
After CPosBigInt a(319837456);
a=00000000000000000000000000000000000000000319837456
----------------------------------------------------
After CPosBigInt a(1484406784);
a=00000000000000000000000000000000000000001484406784
----------------------------------------------------
After CPosBigInt a(2051727616);
a=00000000000000000000000000000000000000002051727616
----------------------------------------------------
After CPosBigInt a(3013131664);
a=00000000000000000000000000000000000000003013131664
----------------------------------------------------
After CPosBigInt a(2266712100);
a=00000000000000000000000000000000000000002266712100
----------------------------------------------------
After CPosBigInt a(1009968400);
a=00000000000000000000000000000000000000001009968400
----------------------------------------------------
After CPosBigInt a(181117764);
a=00000000000000000000000000000000000000000181117764
----------------------------------------------------
After CPosBigInt a(2375587600);
a=00000000000000000000000000000000000000002375587600
----------------------------------------------------
After CPosBigInt a(942490000);
a=00000000000000000000000000000000000000000942490000
----------------------------------------------------
After CPosBigInt a(900720144);
a=00000000000000000000000000000000000000000900720144
----------------------------------------------------
After CPosBigInt a(3869088804);
a=00000000000000000000000000000000000000003869088804
----------------------------------------------------
After CPosBigInt a(2380073796);
a=00000000000000000000000000000000000000002380073796
----------------------------------------------------
After CPosBigInt a(50353216);
a=00000000000000000000000000000000000000000050353216
----------------------------------------------------
Press any key to continue
*/
|