亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? zz.txt

?? NTL is a high-performance, portable C++ library providing data structures and algorithms for manipul
?? TXT
?? 第 1 頁 / 共 2 頁
字號(hào):

/**************************************************************************\

MODULE: ZZ

SUMMARY:

The class ZZ is used to represent signed, arbitrary length integers.

Routines are provided for all of the basic arithmetic operations, as
well as for some more advanced operations such as primality testing.
Space is automatically managed by the constructors and destructors.

This module also provides routines for generating small primes, and
fast routines for performing modular arithmetic on single-precision
numbers.


\**************************************************************************/

#include <NTL/tools.h>


class ZZ {
public:

   ZZ(); // initial value is 0

   ZZ& operator=(const ZZ& a);  // assignment operator
   ZZ& operator=(long a);  

   ZZ(const ZZ& a);  // copy constructor
   ~ZZ(); // destructor


   // ...

};


// NOTE: A ZZ is represented as a sequence of "zzigits",
// where each zzigit is between 0 and 2^{NTL_ZZ_NBITS-1}.

// NTL_ZZ_NBITS is  macros defined in <NTL/ZZ.h>.

// SIZE INVARIANT: the number of bits in a ZZ is always less than
// 2^(NTL_BITS_PER_LONG-4).



/**************************************************************************\

                                 Comparison

\**************************************************************************/



// The usual comparison operators: 
   
long operator==(const ZZ& a, const ZZ& b);
long operator!=(const ZZ& a, const ZZ& b);
long operator<(const ZZ& a, const ZZ& b);
long operator>(const ZZ& a, const ZZ& b);
long operator<=(const ZZ& a, const ZZ& b);
long operator>=(const ZZ& a, const ZZ& b);

// other stuff:

long sign(const ZZ& a); // returns sign of a (-1, 0, +1)
long IsZero(const ZZ& a); // test for 0
long IsOne(const ZZ& a); // test for 1

long compare(const ZZ& a, const ZZ& b); // returns sign of a-b (-1, 0, or 1).

// PROMOTIONS: the comparison operators and the function compare
// support promotion from long to ZZ on (a, b).


/**************************************************************************\

                                 Addition

\**************************************************************************/


// operator notation:

ZZ operator+(const ZZ& a, const ZZ& b);
ZZ operator-(const ZZ& a, const ZZ& b);
ZZ operator-(const ZZ& a); // unary -

ZZ& operator+=(ZZ& x, const ZZ& a); 
ZZ& operator+=(ZZ& x, long a); 

ZZ& operator-=(ZZ& x, const ZZ& a); 
ZZ& operator-=(ZZ& x, long a); 

ZZ& operator++(ZZ& x);  // prefix
void operator++(ZZ& x, int);  // postfix

ZZ& operator--(ZZ& x);  // prefix
void operator--(ZZ& x, int);  // postfix



// procedural versions:

void add(ZZ& x, const ZZ& a, const ZZ& b); // x = a + b
void sub(ZZ& x, const ZZ& a, const ZZ& b); // x = a - b
void SubPos(ZZ& x, const ZZ& a, const ZZ& b); // x = a-b; assumes a >= b >= 0.
void negate(ZZ& x, const ZZ& a); // x = -a

void abs(ZZ& x, const ZZ& a); // x = |a|
ZZ abs(const ZZ& a);

// PROMOTIONS: binary +, -, as well as the procedural versions add, sub
// support promotions from long to ZZ on (a, b).


/**************************************************************************\

                             Multiplication

\**************************************************************************/

// operator notation:

ZZ operator*(const ZZ& a, const ZZ& b);

ZZ& operator*=(ZZ& x, const ZZ& a);
ZZ& operator*=(ZZ& x, long a);

// procedural versions:

void mul(ZZ& x, const ZZ& a, const ZZ& b); // x = a * b

void sqr(ZZ& x, const ZZ& a); // x = a*a
ZZ sqr(const ZZ& a); 

// PROMOTIONS: operator * and procedure mul support promotion
// from long to ZZ on (a, b).


/**************************************************************************\

                                 Division

\**************************************************************************/


// operator notation:

ZZ operator/(const ZZ& a, const ZZ& b);
ZZ operator/(const ZZ& a, long  b);

ZZ operator%(const ZZ& a, const ZZ& b);
long operator%(const ZZ& a, long b);

ZZ& operator/=(ZZ& x, const ZZ& b);
ZZ& operator/=(ZZ& x, long b);

ZZ& operator%=(ZZ& x, const ZZ& b);


// procedural versions:

void DivRem(ZZ& q, ZZ& r, const ZZ& a, const ZZ& b);
// q = floor(a/b), r = a - b*q.
// This implies that:
//    |r| < |b|, and if r != 0, sign(r) = sign(b)

void div(ZZ& q, const ZZ& a, const ZZ& b);
// q = floor(a/b)

void rem(ZZ& r, const ZZ& a, const ZZ& b);
// q = floor(a/b), r = a - b*q


// single-precision variants:

long DivRem(ZZ& q, const ZZ& a, long b);
// q = floor(a/b), r = a - b*q, return value is r.

long rem(const ZZ& a, long b);
// q = floor(a/b), r = a - b*q, return value is r.


// divisibility testing:

long divide(ZZ& q, const ZZ& a, const ZZ& b);
long divide(ZZ& q, const ZZ& a, long b);
// if b | a, sets q = a/b and returns 1; otherwise returns 0.

long divide(const ZZ& a, const ZZ& b);
long divide(const ZZ& a, long b);
// if b | a, returns 1; otherwise returns 0.


/**************************************************************************\

                                    GCD's

\**************************************************************************/


void GCD(ZZ& d, const ZZ& a, const ZZ& b);
ZZ GCD(const ZZ& a, const ZZ& b); 

// d = gcd(a, b) (which is always non-negative).  Uses a binary GCD
// algorithm.



void XGCD(ZZ& d, ZZ& s, ZZ& t, const ZZ& a, const ZZ& b);

//  d = gcd(a, b) = a*s + b*t.

// The coefficients s and t are defined according to the standard
// Euclidean algorithm applied to |a| and |b|, with the signs then
// adjusted according to the signs of a and b.

// Uses a variant of Lehmer's algorithm (see Knuth, The Art of Computer
// Programming, vol. 2).




// special-purpose single-precision variants:

long GCD(long a, long b);
// return value is gcd(a, b) (which is always non-negative)

void XGCD(long& d, long& s, long& t, long a, long b);
//  d = gcd(a, b) = a*s + b*t.

//  The coefficients s and t are defined according to the standard
//  Euclidean algorithm applied to |a| and |b|, with the signs then
//  adjusted according to the signs of a and b.



/**************************************************************************\

                             Modular Arithmetic

The following routines perform arithmetic mod n, where n > 1.

All arguments (other than exponents) are assumed to be in the range
0..n-1.  Some routines may check this and raise an error if this
does not hold.  Others may not, and the behaviour is unpredictable
in this case.

\**************************************************************************/



void AddMod(ZZ& x, const ZZ& a, const ZZ& b, const ZZ& n); // x = (a+b)%n
ZZ AddMod(const ZZ& a, const ZZ& b, const ZZ& n);

void SubMod(ZZ& x, const ZZ& a, const ZZ& b, const ZZ& n); // x = (a-b)%n
ZZ SubMod(const ZZ& a, const ZZ& b, const ZZ& n);

void NegateMod(ZZ& x, const ZZ& a, const ZZ& n); // x = -a % n
ZZ NegateMod(const ZZ& a, const ZZ& n);

void MulMod(ZZ& x, const ZZ& a, const ZZ& b, const ZZ& n); // x = (a*b)%n
ZZ MulMod(const ZZ& a, const ZZ& b, const ZZ& n);

void SqrMod(ZZ& x, const ZZ& a, const ZZ& n); // x = a^2 % n
ZZ SqrMod(const ZZ& a, const ZZ& n);

void InvMod(ZZ& x, const ZZ& a, const ZZ& n);
ZZ InvMod(const ZZ& a, const ZZ& n);
// x = a^{-1} mod n (0 <= x < n); error is raised occurs if inverse
// not defined

long InvModStatus(ZZ& x, const ZZ& a, const ZZ& n);
// if gcd(a,b) = 1, then return-value = 0, x = a^{-1} mod n;
// otherwise, return-value = 1, x = gcd(a, n)

void PowerMod(ZZ& x, const ZZ& a, const ZZ& e, const ZZ& n);
ZZ PowerMod(const ZZ& a, const ZZ& e, const ZZ& n);

void PowerMod(ZZ& x, const ZZ& a, long e, const ZZ& n);
ZZ PowerMod(const ZZ& a, long e, const ZZ& n);

// x = a^e % n (e may be negative)


// PROMOTIONS: AddMod, SubMod, and MulMod (both procedural and functional
// forms) support promotions from long to ZZ on (a, b).


/**************************************************************************\

                        Single-precision modular arithmetic

These routines implement single-precision modular arithmetic.  If n is
the modulus, all inputs should be in the range 0..n-1.  The number n
itself should be in the range 2..NTL_SP_BOUND-1.

Most of these routines are, of course, implemented as fast inline
functions.  No checking is done that inputs are in range.

\**************************************************************************/




long AddMod(long a, long b, long n); // return (a+b)%n

long SubMod(long a, long b, long n); // return (a-b)%n

long NegateMod(long a, long n); // return (-a)%n

long MulMod(long a, long b, long n); // return (a*b)%n

long MulMod(long a, long b, long n, double ninv);
// return (a*b)%n.  ninv = 1/((double) n).  This is faster if n is
// fixed for many multiplications.


long MulMod2(long a, long b, long n, double bninv);
// return (a*b)%n.  bninv = ((double) b)/((double) n).  This is faster
// if both n and b are fixed for many multiplications.
// Note: This is OBSOLETE -- use MulModPrecon (see below) for 
// better performance.


long MulDivRem(long& q, long a, long b, long n, double bninv);
// return (a*b)%n, set q = (a*b)/n.  bninv = ((double) b)/((double) n)

long InvMod(long a, long n);
// computes a^{-1} mod n.  Error is raised if undefined.

long PowerMod(long a, long e, long n);
// computes a^e mod n (e may be negative)



// The following are variants of MulMod2 above that may be significantly 
// faster on certain machines.  The implmentation varies depending
// on the settings of the flags NTL_SPMM_ULL and NTL_SPMM_UL.
// By default (no flags), the implementation is the same as MulMod2 above.
// It is best to let the Wizard script select the optimal flag.

typedef mulmod_precon_t  /*  depends on implementation */ ;

mulmod_precon_t PrepMulModPrecon(long b, long n, double ninv);
// Prepares preconditioning. ninv = 1/((double) n)

long MulModPrecon(long a, long b, long n, mulmod_precon_t bninv);
// return (a*b)%n.  bninv = MulModPrecon(b, n, ninv).

// Example of use:
//    long a, b, n, c;
//      ...
//    double ninv = 1/((double) n);
//    mulmod_precon_t bninv = PrepMulModPrecon(b, n, ninv);
//     ...
//    c = MulModPrecon(a, b, n, bninv);  // c = (a*b) % n






/**************************************************************************\

                               Shift Operations

LeftShift by n means multiplication by 2^n
RightShift by n means division by 2^n, with truncation toward zero
  (so the sign is preserved).

A negative shift amount reverses the direction of the shift.

\**************************************************************************/

// operator notation:

ZZ operator<<(const ZZ& a, long n);
ZZ operator>>(const ZZ& a, long n);

ZZ& operator<<=(ZZ& x, long n);
ZZ& operator>>=(ZZ& x, long n);

// procedural versions:

void LeftShift(ZZ& x, const ZZ& a, long n); 
ZZ LeftShift(const ZZ& a, long n);

void RightShift(ZZ& x, const ZZ& a, long n); 
ZZ RightShift(const ZZ& a, long n); 



/**************************************************************************\

                              Bits and Bytes

\**************************************************************************/



long MakeOdd(ZZ& x);
// removes factors of 2 from x, returns the number of 2's removed
// returns 0 if x == 0

long NumTwos(const ZZ& x);
// returns max e such that 2^e divides x if x != 0, and returns 0 if x == 0.

long IsOdd(const ZZ& a); // test if a is odd

long NumBits(const ZZ& a);
long NumBits(long a);  
// returns the number of bits in binary represenation of |a|; 
// NumBits(0) = 0


long bit(const ZZ& a, long k);
long bit(long a, long k); 
// returns bit k of |a|, position 0 being the low-order bit.
// If  k < 0 or k >= NumBits(a), returns 0.


void trunc(ZZ& x, const ZZ& a, long k);
// x = low order k bits of |a|. 
// If k <= 0, x = 0.

// two functional variants:
ZZ trunc_ZZ(const ZZ& a, long k);  
long trunc_long(const ZZ& a, long k);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩理论片网站| 欧美videossexotv100| 国产成人精品一区二区三区四区 | 免费观看一级欧美片| 日日摸夜夜添夜夜添国产精品 | 全国精品久久少妇| 亚洲h在线观看| 日本视频免费一区| 美女看a上一区| 国产一区啦啦啦在线观看| 国产激情精品久久久第一区二区| 国产一区高清在线| 99久久婷婷国产| 欧美亚洲自拍偷拍| 91精品国产91热久久久做人人| 欧美一级夜夜爽| 久久久久久免费| 亚洲色图清纯唯美| 亚洲福利视频一区| 国产一区二区三区久久久 | 日本aⅴ免费视频一区二区三区| 奇米精品一区二区三区在线观看 | 欧美日韩精品一区二区三区| 3atv一区二区三区| 国产亚洲一本大道中文在线| 亚洲色图在线看| 日本亚洲免费观看| 成人高清免费观看| 欧美精品久久99| 欧美国产精品专区| 婷婷一区二区三区| 国产91色综合久久免费分享| 色综合久久天天| 欧美mv日韩mv亚洲| 亚洲伦在线观看| 九九国产精品视频| 色系网站成人免费| 久久久久久久久久久久久久久99 | 91亚洲国产成人精品一区二三 | 成人激情午夜影院| 日韩一区二区麻豆国产| 中文字幕亚洲区| 蜜桃久久av一区| 色久优优欧美色久优优| 欧美xxxxx裸体时装秀| 一区二区三区美女视频| 国产一区二区精品久久91| 欧美日韩成人综合天天影院| 亚洲国产精品精华液ab| 麻豆成人综合网| 色吊一区二区三区| 国产日韩精品一区二区三区| 天天av天天翘天天综合网| 99热精品一区二区| 国产亚洲成av人在线观看导航 | 中文字幕 久热精品 视频在线| 亚洲福利一二三区| 在线视频你懂得一区| 日本一区二区不卡视频| 久久er精品视频| 欧美精品自拍偷拍动漫精品| 亚洲视频免费在线| av不卡在线观看| 国产精品日产欧美久久久久| 国产一区二区三区香蕉| 日韩欧美资源站| 日本欧美肥老太交大片| 欧美日韩国产综合视频在线观看 | 精品一区二区三区免费播放| 欧美日本乱大交xxxxx| 亚洲综合清纯丝袜自拍| 欧美在线视频日韩| 亚洲一区二区成人在线观看| 在线免费不卡电影| 一区二区三区免费在线观看| 91丨porny丨国产| 亚洲精品国久久99热| av一本久道久久综合久久鬼色| 久久精品视频在线看| 成人午夜激情影院| 国产精品久久福利| 色悠久久久久综合欧美99| 亚洲精品乱码久久久久久黑人| 91丨国产丨九色丨pron| 一区二区三区在线视频播放| 欧洲一区二区三区免费视频| 亚洲风情在线资源站| 欧美一区二区三区白人| 韩国毛片一区二区三区| 国产清纯美女被跳蛋高潮一区二区久久w| 激情小说亚洲一区| 国产精品国产三级国产普通话99 | 一区二区三区四区高清精品免费观看 | 激情综合亚洲精品| 久久久久青草大香线综合精品| 粉嫩av一区二区三区| 亚洲精品视频在线观看网站| 欧美日韩国产综合一区二区三区| 日精品一区二区| 国产午夜精品一区二区三区四区| 成人黄色软件下载| 午夜欧美电影在线观看| 欧美精品一区二区三区一线天视频| 顶级嫩模精品视频在线看| 国产精品短视频| 555www色欧美视频| 成人免费视频国产在线观看| 亚洲一区二区三区四区不卡| 日韩女优av电影| caoporen国产精品视频| 日韩在线a电影| 中文字幕在线一区免费| 欧美二区在线观看| 成人黄动漫网站免费app| 天天综合网天天综合色| 国产精品久久福利| 精品国产1区2区3区| 欧洲精品一区二区三区在线观看| 精品在线你懂的| 午夜久久久久久久久久一区二区| 久久久久久亚洲综合| 91精品国产91热久久久做人人| 成人免费毛片嘿嘿连载视频| 日韩成人一区二区三区在线观看| 国产精品福利一区| 久久久天堂av| 91精品国产欧美一区二区| 99re这里只有精品6| 国产综合一区二区| 日韩在线一区二区三区| 亚洲激情在线激情| 中文字幕日韩av资源站| 久久你懂得1024| 日韩欧美激情在线| 欧美日韩三级一区二区| 91在线观看免费视频| 国产一区二区三区| 激情综合亚洲精品| 蜜臀av一区二区在线观看| 亚洲va天堂va国产va久| 一个色妞综合视频在线观看| 国产精品毛片高清在线完整版| 久久网这里都是精品| 欧美tk—视频vk| 精品久久久久久久久久久久包黑料 | 国产精品一区二区三区乱码| 日本不卡的三区四区五区| 日韩高清不卡一区二区| 日韩电影在线观看一区| 日韩精品1区2区3区| 午夜视频一区二区| 图片区日韩欧美亚洲| 午夜精品影院在线观看| 五月综合激情日本mⅴ| 亚洲成人一区在线| 日本视频一区二区| 狠狠色狠狠色合久久伊人| 青椒成人免费视频| 国内精品免费**视频| 国产精品乡下勾搭老头1| 国产高清成人在线| www.欧美色图| 日本福利一区二区| 91精品在线观看入口| 精品国产乱码久久久久久久| 久久美女艺术照精彩视频福利播放| 久久久久国产精品人| 国产精品美女www爽爽爽| 亚洲色欲色欲www| 亚洲成人在线网站| 另类专区欧美蜜桃臀第一页| 国产精品一区二区免费不卡| 大尺度一区二区| 一本一道久久a久久精品综合蜜臀| 91久久免费观看| 91精品国产综合久久久久久久久久 | 国产精品理论片| 亚洲国产另类精品专区| 久草中文综合在线| 国产精品一区二区三区网站| 一本久久a久久精品亚洲| 555www色欧美视频| 国产精品欧美一区喷水| 五月天一区二区三区| 国产成人精品在线看| 欧美日韩精品一区视频| 久久精品综合网| 一区二区三区日韩欧美| 国产一区二区三区久久久| 91极品美女在线| 久久久国产综合精品女国产盗摄| 亚洲精品乱码久久久久久久久| 卡一卡二国产精品| 欧亚洲嫩模精品一区三区| 欧美精品一区二| 午夜av电影一区| 97久久精品人人爽人人爽蜜臀| 欧美一级日韩一级| 中文字幕在线一区免费| 久久av资源网|