?? bigint.h
字號:
/****************************************************************/
//大數運算庫頭文件:BigInt.h
/****************************************************************/
#define BI_MAXLEN 40
#define DEC 10
#define HEX 16
class CBigInt
{
public:
int m_nSign;
int m_nLength;
unsigned long m_ulValue[BI_MAXLEN];
CBigInt();
~CBigInt();
//基本操作與運算
CBigInt& Mov(CBigInt& A);
CBigInt& Mov(unsigned __int64 A);
int Cmp(CBigInt& A);
CBigInt Add(CBigInt& A);
CBigInt Add(long A);
CBigInt Sub(CBigInt& A);
CBigInt Sub(long A);
CBigInt Mul(CBigInt& A);
CBigInt Mul(long A);
CBigInt Div(CBigInt& A);
CBigInt Div(long A);
CBigInt Mod(CBigInt& A);
long Mod(long A);
//輸入輸出
int InPutFromStr(CString& str, const unsigned int system);
int OutPutToStr(CString& str, const unsigned int system);
//歐幾里德算法求:Y=X.Euc(A),使滿足:YX mod A = 1
CBigInt Euc(CBigInt& A);
//蒙哥馬利算法求:Y=X.Mon(A,B),使滿足:X^A mod B = Y
CBigInt Mon(CBigInt& A, CBigInt& B);
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -