?? vlong.h
字號:
// vlong.h: interface for the vlong class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_VLONG_H__9C2E4C0D_D6F7_4E68_9FF5_80452E8BF458__INCLUDED_)
#define AFX_VLONG_H__9C2E4C0D_D6F7_4E68_9FF5_80452E8BF458__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "vlongvalue.h"
class vlong
{
public:
// Standard arithmetic operators
friend vlong operator +( const vlong& x, const vlong& y );
friend vlong operator -( const vlong& x, const vlong& y );
friend vlong operator *( const vlong& x, const vlong& y );
friend vlong operator /( const vlong& x, const vlong& y );
friend vlong operator %( const vlong& x, const vlong& y );
vlong& operator += ( const vlong& x );
vlong& operator -= ( const vlong& x );
vlong& operator = ( const vlong& x );
// Standard comparison operators
friend inline int operator !=( const vlong& x, const vlong& y ){ return x.cf( y ) != 0; }
friend inline int operator ==( const vlong& x, const vlong& y ){ return x.cf( y ) == 0; }
friend inline int operator >=( const vlong& x, const vlong& y ){ return x.cf( y ) >= 0; }
friend inline int operator <=( const vlong& x, const vlong& y ){ return x.cf( y ) <= 0; }
friend inline int operator > ( const vlong& x, const vlong& y ){ return x.cf( y ) > 0; }
friend inline int operator < ( const vlong& x, const vlong& y ){ return x.cf( y ) < 0; }
public:
vlong( unsigned x=0 );
vlong( const vlong& x );
virtual ~vlong();
operator unsigned ();
private:
class vlong_value * pValue;
int negative;
int cf( const vlong x ) const;
void docopy();
friend class monty;
};
#endif // !defined(AFX_VLONG_H__9C2E4C0D_D6F7_4E68_9FF5_80452E8BF458__INCLUDED_)
vlong modexp( const vlong & x, const vlong & e, const vlong & m ); // m must be odd
vlong gcd( const vlong &X, const vlong &Y ); // greatest common denominator
vlong modinv( const vlong &a, const vlong &m ); // modular inverse
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -