亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩一区二区不卡| 日韩欧美一区二区三区在线| 日本aⅴ精品一区二区三区| 国产亚洲精品bt天堂精选| 欧美少妇bbb| www.视频一区| 国产精品99久久久久久有的能看| 亚洲国产精品久久艾草纯爱| 中文字幕亚洲欧美在线不卡| 欧美videos大乳护士334| 欧美天天综合网| 94-欧美-setu| 国产99久久久国产精品潘金| 免费视频最近日韩| 天天综合日日夜夜精品| 一区二区三区毛片| 国产精品久久久久久久久免费丝袜 | 亚洲成人动漫精品| 亚洲三级免费观看| 中国av一区二区三区| 精品国精品国产| 777午夜精品免费视频| 欧美性受xxxx| 日本韩国精品在线| 91蜜桃婷婷狠狠久久综合9色| 成人性视频网站| 国产91对白在线观看九色| 韩国av一区二区三区在线观看| 日韩精品一二三区| 日本伊人午夜精品| 亚洲不卡一区二区三区| 亚洲午夜久久久久久久久久久 | 亚洲国产精品成人久久综合一区| 久久综合久久综合九色| 欧美成人欧美edvon| 日韩三级视频中文字幕| 日韩三级视频在线看| 91精品国产综合久久久久久久久久| 欧美三级三级三级爽爽爽| 在线欧美小视频| 欧美日韩一区二区欧美激情| 欧美日本不卡视频| 7777精品伊人久久久大香线蕉经典版下载 | 欧美怡红院视频| 欧美色区777第一页| 欧美疯狂性受xxxxx喷水图片| 欧美日韩精品久久久| 欧美二区在线观看| 日韩欧美不卡在线观看视频| 欧美不卡一区二区三区四区| 欧美成人女星排行榜| 26uuu色噜噜精品一区二区| 久久久精品2019中文字幕之3| 日本一区二区成人在线| 亚洲日本乱码在线观看| 亚洲午夜精品在线| 免费成人性网站| 国产伦精品一区二区三区免费迷| 风间由美一区二区三区在线观看 | 国产一区二区福利视频| 丰满少妇在线播放bd日韩电影| 成人中文字幕电影| 在线观看视频91| 日韩视频免费观看高清完整版 | 精品电影一区二区| 久久精品免视看| 中文字幕佐山爱一区二区免费| 一个色在线综合| 日本免费在线视频不卡一不卡二| 国产在线视频一区二区三区| 成人黄色一级视频| 欧洲精品视频在线观看| 欧美一区二区免费观在线| 久久久久久久久岛国免费| 中文字幕在线观看不卡| 午夜精品一区二区三区免费视频| 精品亚洲porn| 99vv1com这只有精品| 欧美精品丝袜中出| 国产欧美日韩激情| 亚洲国产一区二区a毛片| 激情五月婷婷综合网| 色94色欧美sute亚洲线路二| 日韩午夜av一区| 亚洲乱码国产乱码精品精的特点 | 国产精品无码永久免费888| 亚洲激情校园春色| 久久草av在线| 欧美无人高清视频在线观看| 国产三级一区二区| 男女男精品网站| 色婷婷激情久久| 久久精品亚洲麻豆av一区二区| 亚洲愉拍自拍另类高清精品| 国产一区二区91| 5月丁香婷婷综合| 最新久久zyz资源站| 另类小说图片综合网| 欧美在线制服丝袜| 欧美国产成人精品| 久久机这里只有精品| 在线观看一区不卡| 国产精品久久久久一区| 久久精品国产色蜜蜜麻豆| 色婷婷久久久亚洲一区二区三区| 久久精品人人做人人爽人人| 视频一区欧美日韩| 在线视频欧美精品| 久久国内精品视频| 欧美精品xxxxbbbb| 一区2区3区在线看| 成人av电影免费观看| 精品sm在线观看| 欧美bbbbb| 欧美美女一区二区在线观看| 亚洲精品免费在线播放| 不卡一卡二卡三乱码免费网站| 精品国产成人在线影院 | 一本色道久久综合亚洲精品按摩| 国产亚洲女人久久久久毛片| 久久福利视频一区二区| 欧美猛男超大videosgay| 一二三四区精品视频| 99久久久精品免费观看国产蜜| 欧美精彩视频一区二区三区| 国产伦精品一区二区三区免费 | 日韩午夜在线观看| 日本欧洲一区二区| 欧美一区2区视频在线观看| 亚洲va欧美va国产va天堂影院| 色婷婷久久一区二区三区麻豆| 136国产福利精品导航| 成人黄色小视频在线观看| 国产精品午夜免费| av亚洲精华国产精华精华| 国产精品国产三级国产a| 高清beeg欧美| 亚洲欧洲色图综合| 日本道精品一区二区三区| 亚洲麻豆国产自偷在线| 色菇凉天天综合网| 亚洲国产精品久久人人爱蜜臀| 欧洲人成人精品| 日本成人中文字幕在线视频| 91精品国产91久久久久久一区二区| 青青草国产成人99久久| 日韩精品中文字幕在线不卡尤物| 免费成人在线影院| 国产欧美一区在线| 色婷婷av久久久久久久| 亚洲www啪成人一区二区麻豆| 91精品国产品国语在线不卡| 久久精品久久精品| 欧美国产乱子伦| 在线观看免费一区| 日本视频中文字幕一区二区三区| 精品久久久三级丝袜| 高清不卡一区二区在线| 一区二区三区免费观看| 日韩一区二区免费在线观看| 国产乱码精品1区2区3区| 国产精品色一区二区三区| 91麻豆高清视频| 人人精品人人爱| 欧美激情一区二区| 欧美三级在线看| 狠狠色丁香婷综合久久| 亚洲欧美日韩电影| 日韩欧美国产一二三区| 波多野结衣精品在线| 午夜精品福利在线| 日本一区二区不卡视频| 欧美日韩一区在线| 国产成人av资源| 亚洲国产毛片aaaaa无费看| 精品国产亚洲一区二区三区在线观看 | 亚洲一二三区在线观看| 日韩精品在线一区二区| av综合在线播放| 久久99久国产精品黄毛片色诱| 国产精品福利一区二区三区| 欧美人伦禁忌dvd放荡欲情| 国产二区国产一区在线观看| 亚洲mv大片欧洲mv大片精品| 国产欧美1区2区3区| 欧美群妇大交群的观看方式| 成人性生交大片免费看中文 | 日韩在线卡一卡二| 国产精品久久久久久亚洲毛片 | 国产精品看片你懂得| 欧美疯狂做受xxxx富婆| 成人午夜碰碰视频| 日韩高清欧美激情| 亚洲欧美另类小说视频| 国产无一区二区| 日韩精品一区二区三区在线播放| 一本久久综合亚洲鲁鲁五月天| 国产精品一级黄| 蜜臀av性久久久久av蜜臀妖精 | 日本一区二区久久|