【文件属性】:
文件名称:100位的双精度算法---扩充int64
文件大小:5KB
文件格式:CPP
更新时间:2012-08-13 17:51:36
100位 双精度数 补码 异或
typedef struct int100{ //100位长整数,以补码存储
__int64 low; //低0 ... 2^51-1位 51 .. 63 位置空,作溢出时保留数据用
__int64 top; //高0 ... 2^61-1
//__int64 sign; //符号位在高位的 第0+61位 62 位作借位用, 63位置空
//__int64 size; //范围 -2^112 ...2^112-1
//int100(){low=0;top=0;sign=0;size=1;} //默认为0
//int100(__int64 _low,__int64 _top,__int64 _sign,__int64 _size){
// low=_low;top=_top;sign=_sign;size=_size;
//}
int100(){low=0;top=0;}
int100(__int64 _low,__int64 _top){
low=_low;top=_top;
}
}int100;
int100 to_source(int100 a){//补码转原码
int100 to_patch(int100 b)//原码转补码
int100 add(int100 a,int100 b)
int100 sub(int100 a,int100 b)
要下就下,别在这里瞎评论!
Coding by Tiandy