- #include <cstdlib>
- #include <iostream>
-
- #include "SuperInt.h"
-
-
- using namespace std;
-
- int main(int argc, char *argv[])
- {
- SuperInt a,b,c,d,e,f,g,h;
-
- a=7;
- b=5;
- c=((a << 38) | 14)>>2;
- d=((a << 32) | 12)>>1;
- e=c*d,
- f=(a<<32)-b+4;
- a=~a;
-
- a=10;
- b=2;
- g=(a<<32)/b;
-
- a=(((a<<32)<<32)<<16);
- a[7]=0x154715;
- a.SetOverflow(true);
-
- h=0x25c935d;
- h=(g/542)*542+(g%542);
-
- //gustos y colores ...
- SuperInt_Separador32Char=' ';
- SuperInt_OverflowChar='.';
- SuperInt_TamanoFijo=true;
-
-
- cout<<"a: "<<a<<endl;
- cout<<"b: "<<b<<endl;
- cout<<"c: "<<c<<endl;
- cout<<"d: "<<d<<endl;
- cout<<"e: "<<e<<endl;
- cout<<"f: "<<f<<endl;
- cout<<"g: "<<g<<endl;
- cout<<"h: "<<h<<endl;
-
- cout<<endl;
-
- if ((a!=0) || (c==d))
- cout<<"test : true"<<endl;
- else
- cout<<"test : false"<<endl;
-
- system("PAUSE");
- return EXIT_SUCCESS;
- }
-
#include <cstdlib>
#include <iostream>
#include "SuperInt.h"
using namespace std;
int main(int argc, char *argv[])
{
SuperInt a,b,c,d,e,f,g,h;
a=7;
b=5;
c=((a << 38) | 14)>>2;
d=((a << 32) | 12)>>1;
e=c*d,
f=(a<<32)-b+4;
a=~a;
a=10;
b=2;
g=(a<<32)/b;
a=(((a<<32)<<32)<<16);
a[7]=0x154715;
a.SetOverflow(true);
h=0x25c935d;
h=(g/542)*542+(g%542);
//gustos y colores ...
SuperInt_Separador32Char=' ';
SuperInt_OverflowChar='.';
SuperInt_TamanoFijo=true;
cout<<"a: "<<a<<endl;
cout<<"b: "<<b<<endl;
cout<<"c: "<<c<<endl;
cout<<"d: "<<d<<endl;
cout<<"e: "<<e<<endl;
cout<<"f: "<<f<<endl;
cout<<"g: "<<g<<endl;
cout<<"h: "<<h<<endl;
cout<<endl;
if ((a!=0) || (c==d))
cout<<"test : true"<<endl;
else
cout<<"test : false"<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}