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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? zz.h

?? 密碼大家Shoup寫的數論算法c語言實現
?? H
?? 第 1 頁 / 共 3 頁
字號:
#ifndef NTL_ZZ__H#define NTL_ZZ__H/********************************************************   LIP INTERFACE    The class ZZ implements signed, arbitrary length integers.**********************************************************/#include <NTL/lip.h>#include <NTL/tools.h>NTL_OPEN_NNSclass ZZ {public:NTL_verylong rep; // This is currently public for "emergency" situations                   // May be private in future versions.ZZ() // initial value is 0.{ rep = 0; }ZZ(INIT_SIZE_TYPE, long k)// initial value is 0, but space is pre-allocated so that numbers// x with x.size() <= k can be stored without re-allocation.// Call with ZZ(INIT_SIZE, k).// The purpose for the INIT_SIZE argument is to prevent automatic// type conversion from long to ZZ, which would be tempting, but wrong.{   rep = 0;   NTL_zsetlength(&rep, k); }ZZ(const ZZ& a)// initial value is a.{   rep = 0;   NTL_zcopy(a.rep, &rep);}ZZ(INIT_VAL_TYPE, long a) { rep = 0; NTL_zintoz(a, &rep); }ZZ(INIT_VAL_TYPE, int a) { rep = 0; NTL_zintoz(a, &rep); }ZZ(INIT_VAL_TYPE, unsigned long a) { rep = 0; NTL_zuintoz(a, &rep); }ZZ(INIT_VAL_TYPE, unsigned int a) { rep = 0; NTL_zuintoz((unsigned long) a, &rep); }inline ZZ(INIT_VAL_TYPE, const char *);inline ZZ(INIT_VAL_TYPE, float);inline ZZ(INIT_VAL_TYPE, double);ZZ& operator=(const ZZ& a) { NTL_zcopy(a.rep, &rep); return *this; }ZZ& operator=(long a) { NTL_zintoz(a, &rep); return *this; }~ZZ() { NTL_zfree(&rep); }void kill()// force the space held by this ZZ to be released.// The value then becomes 0.{ NTL_zfree(&rep); }void SetSize(long k)// pre-allocates space for k-digit numbers (base 2^NTL_ZZ_NBITS);  // does not change the value.{ NTL_zsetlength(&rep, k); }long size() const   { return NTL_zsize(rep); }// returns the number of (NTL_ZZ_NBIT-bit) digits of |a|; the size of 0 is 0.long SinglePrecision() const   { return NTL_zsptest(rep); }// tests if less than NTL_SP_BOUND in absolute valuelong WideSinglePrecision() const   { return NTL_zwsptest(rep); }// tests if less than NTL_WSP_BOUND in absolute valuestatic const ZZ& zero();ZZ(ZZ& x, INIT_TRANS_TYPE) { rep = x.rep; x.rep = 0; }// used to cheaply hand off memory management of return value,// without copying, assuming compiler implements the// "return value optimization"};const ZZ& ZZ_expo(long e);inline void clear(ZZ& x)// x = 0   { NTL_zzero(&x.rep); }inline void set(ZZ& x)// x = 1   { NTL_zone(&x.rep); }inline void swap(ZZ& x, ZZ& y)// swap the values of x and y (swaps pointers only)   { NTL_zswap(&x.rep, &y.rep); }inline double log(const ZZ& a)   { return NTL_zlog(a.rep); }/**********************************************************   Conversion routines.***********************************************************/inline void conv(ZZ& x, const ZZ& a) { x = a; }inline ZZ to_ZZ(const ZZ& a) { return a; }inline void conv(ZZ& x, long a) { NTL_zintoz(a, &x.rep); }inline ZZ to_ZZ(long a) { return ZZ(INIT_VAL, a); }inline void conv(ZZ& x, int a) { NTL_zintoz(long(a), &x.rep); }inline ZZ to_ZZ(int a) { return ZZ(INIT_VAL, a); }inline void conv(ZZ& x, unsigned long a) { NTL_zuintoz(a, &x.rep); }inline ZZ to_ZZ(unsigned long a) { return ZZ(INIT_VAL, a); }inline void conv(ZZ& x, unsigned int a) { NTL_zuintoz((unsigned long)(a), &x.rep); }inline ZZ to_ZZ(unsigned int a) { return ZZ(INIT_VAL, a); }void conv(ZZ& x, const char *s);inline ZZ::ZZ(INIT_VAL_TYPE, const char *s) {  rep = 0; conv(*this, s); }inline ZZ to_ZZ(const char *s) { return ZZ(INIT_VAL, s); }inline void conv(ZZ& x, double a) { NTL_zdoubtoz(a, &x.rep); }inline ZZ::ZZ(INIT_VAL_TYPE, double a) { rep = 0; conv(*this, a); }inline ZZ to_ZZ(double a) { return ZZ(INIT_VAL, a); }inline void conv(ZZ& x, float a) { NTL_zdoubtoz(double(a), &x.rep); }inline ZZ::ZZ(INIT_VAL_TYPE, float a) { rep = 0; conv(*this, a); }inline ZZ to_ZZ(float a) { return ZZ(INIT_VAL, a); }inline void conv(long& x, const ZZ& a) { x = NTL_ztoint(a.rep); }inline long to_long(const ZZ& a)  { return NTL_ztoint(a.rep); }inline void conv(int& x, const ZZ& a) { x = int(NTL_ztoint(a.rep)); }inline int to_int(const ZZ& a)  { return int(NTL_ztoint(a.rep)); }inline void conv(unsigned long& x, const ZZ& a) { x = NTL_ztouint(a.rep); }inline long to_ulong(const ZZ& a)  { return NTL_ztouint(a.rep); }inline void conv(unsigned int& x, const ZZ& a)    { x = (unsigned int)(NTL_ztouint(a.rep)); }inline unsigned int to_uint(const ZZ& a)     { return (unsigned int)(NTL_ztouint(a.rep)); }inline void conv(double& x, const ZZ& a) { x = NTL_zdoub(a.rep); }inline double to_double(const ZZ& a) { return NTL_zdoub(a.rep); }inline void conv(float& x, const ZZ& a) { x = float(NTL_zdoub(a.rep)); }inline float to_float(const ZZ& a) { return float(NTL_zdoub(a.rep)); }inline void ZZFromBytes(ZZ& x, const unsigned char *p, long n)   { NTL_zfrombytes(&x.rep, p, n); }inline ZZ ZZFromBytes(const unsigned char *p, long n)   { ZZ x; ZZFromBytes(x, p, n); NTL_OPT_RETURN(ZZ, x); }inline void BytesFromZZ(unsigned char *p, const ZZ& a, long n)   { NTL_zbytesfromz(p, a.rep, n); }// ****** comparisonsinline long sign(const ZZ& a)// returns the sign of a (-1, 0, or 1).   { return NTL_zsign(a.rep); }inline long compare(const ZZ& a, const ZZ& b)// returns the sign of a-b (-1, 0, or 1).{   return NTL_zcompare(a.rep, b.rep);}inline long IsZero(const ZZ& a)// zero test   { return NTL_ziszero(a.rep); }inline long IsOne(const ZZ& a)   { return NTL_zisone(a.rep); }// test for 1   /* the usual comparison operators */inline long operator==(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) == 0; }inline long operator!=(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) != 0; }inline long operator<(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) < 0; }inline long operator>(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) > 0; }inline long operator<=(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) <= 0; }inline long operator>=(const ZZ& a, const ZZ& b)  { return NTL_zcompare(a.rep, b.rep) >= 0; }/* single-precision versions of the above */inline long compare(const ZZ& a, long b) { return NTL_zscompare(a.rep, b); }inline long compare(long a, const ZZ& b) { return -NTL_zscompare(b.rep, a); }inline long operator==(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) == 0; }inline long operator!=(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) != 0; }inline long operator<(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) < 0; }inline long operator>(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) > 0; }inline long operator<=(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) <= 0; }inline long operator>=(const ZZ& a, long b) { return NTL_zscompare(a.rep, b) >= 0; }inline long operator==(long a, const ZZ& b) { return b == a; }inline long operator!=(long a, const ZZ& b) { return b != a; }inline long operator<(long a, const ZZ& b) { return b > a; }inline long operator>(long a, const ZZ& b) { return b < a; }inline long operator<=(long a, const ZZ& b) { return b >= a; }inline long operator>=(long a, const ZZ& b) { return b <= a; }/**************************************************                 Addition**************************************************/inline void add(ZZ& x, const ZZ& a, const ZZ& b)// x = a + b   { NTL_zadd(a.rep, b.rep, &x.rep); }inline void sub(ZZ& x, const ZZ& a, const ZZ& b)// x = a - b   { NTL_zsub(a.rep, b.rep, &x.rep); }inline void SubPos(ZZ& x, const ZZ& a, const ZZ& b)// x = a - b;  assumes a >= b >= 0.   { NTL_zsubpos(a.rep, b.rep, &x.rep); }inline void negate(ZZ& x, const ZZ& a)// x = -a   { NTL_zcopy(a.rep, &x.rep); NTL_znegate(&x.rep); }inline void abs(ZZ& x, const ZZ& a)// x = |a|{ NTL_zcopy(a.rep, &x.rep); NTL_zabs(&x.rep); }/* single-precision versions of the above */inline void add(ZZ& x, const ZZ& a, long b)   { NTL_zsadd(a.rep, b, &x.rep); }inline void add(ZZ& x, long a, const ZZ& b) { add(x, b, a); }void sub(ZZ& x, const ZZ& a, long b);void sub(ZZ& x, long a, const ZZ& b);/* operator/function notation */inline ZZ operator+(const ZZ& a, const ZZ& b)   { ZZ x; add(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator+(const ZZ& a, long b)   { ZZ x; add(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator+(long  a, const ZZ& b)   { ZZ x; add(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator-(const ZZ& a, const ZZ& b)   { ZZ x; sub(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator-(const ZZ& a, long b)   { ZZ x; sub(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator-(long  a, const ZZ& b)   { ZZ x; sub(x, a, b); NTL_OPT_RETURN(ZZ, x); } inline ZZ operator-(const ZZ& a)  { ZZ x; negate(x, a); NTL_OPT_RETURN(ZZ, x); }inline ZZ abs(const ZZ& a)  { ZZ x; abs(x, a); NTL_OPT_RETURN(ZZ, x); }/* op= notation */inline ZZ& operator+=(ZZ& x, const ZZ& a)  { add(x, x, a); return x; }inline ZZ& operator+=(ZZ& x, long a)  { add(x, x, a); return x; }inline ZZ& operator-=(ZZ& x, const ZZ& a)  { sub(x, x, a); return x; }inline ZZ& operator-=(ZZ& x, long a)  { sub(x, x, a); return x; }/* inc/dec */inline ZZ& operator++(ZZ& x) { add(x, x, 1); return x; }inline void operator++(ZZ& x, int) { add(x, x, 1); }inline ZZ& operator--(ZZ& x) { add(x, x, -1); return x; }inline void operator--(ZZ& x, int) { add(x, x, -1); }/*******************************************************                 Multiplication.********************************************************/inline void mul(ZZ& x, const ZZ& a, const ZZ& b)// x = a * b   { NTL_zmul(a.rep, b.rep, &x.rep); }inline void sqr(ZZ& x, const ZZ& a)// x = a*a   { NTL_zsq(a.rep, &x.rep); }inline ZZ sqr(const ZZ& a)   { ZZ x; sqr(x, a); NTL_OPT_RETURN(ZZ, x); }/* single-precision versions */inline void mul(ZZ& x, const ZZ& a, long b)   { NTL_zsmul(a.rep, b, &x.rep); }inline void mul(ZZ& x, long a, const ZZ& b)    { mul(x, b, a); }/* operator notation */inline ZZ operator*(const ZZ& a, const ZZ& b)  { ZZ x; mul(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator*(const ZZ& a, long b)  { ZZ x; mul(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator*(long a, const ZZ& b)  { ZZ x; mul(x, a, b); NTL_OPT_RETURN(ZZ, x); }/* op= notation */inline ZZ& operator*=(ZZ& x, const ZZ& a)  { mul(x, x, a); return x; }inline ZZ& operator*=(ZZ& x, long a)  { mul(x, x, a); return x; }// Special routines for implementing CRT in ZZ_pX arithmeticinline void ZZ_p_crt_struct_init(void **crt_struct, long n, const ZZ& p,                                  const long *primes)    { NTL_crt_struct_init(crt_struct, n, p.rep, primes); }inline void ZZ_p_crt_struct_insert(void *crt_struct, long i, const ZZ& m)   { NTL_crt_struct_insert(crt_struct, i, m.rep); }inline void ZZ_p_crt_struct_free(void *crt_struct)   { NTL_crt_struct_free(crt_struct); }inline void ZZ_p_crt_struct_eval(void *crt_struct, ZZ& t, const long *a)   { NTL_crt_struct_eval(crt_struct, &t.rep, a); }inline long ZZ_p_crt_struct_special(void *crt_struct)   { return NTL_crt_struct_special(crt_struct); }// Special routines for fast remainderinginline void ZZ_p_rem_struct_init(void **rem_struct, long n,                                  const ZZ& p, long *primes)   { NTL_rem_struct_init(rem_struct, n, p.rep, primes); }inline void ZZ_p_rem_struct_free(void *rem_struct)   { NTL_rem_struct_free(rem_struct); }inline void ZZ_p_rem_struct_eval(void *rem_struct, long *x, const ZZ& a)   { NTL_rem_struct_eval(rem_struct, x, a.rep); }/*******************************************************                    Division*******************************************************/inline void DivRem(ZZ& q, ZZ& r, const ZZ& a, const ZZ& b)// q = [a/b], r = a - b*q// |r| < |b|, and if r != 0, sign(r) = sign(b)   { NTL_zdiv(a.rep, b.rep, &q.rep, &r.rep); }inline void div(ZZ& q, const ZZ& a, const ZZ& b)// q = a/b   { NTL_zdiv(a.rep, b.rep, &q.rep, 0); }inline void rem(ZZ& r, const ZZ& a, const ZZ& b)// r = a%b   { NTL_zmod(a.rep, b.rep, &r.rep); }inline void QuickRem(ZZ& r, const ZZ& b)// r = r%b// assumes b > 0 and r >=0// division is performed in place and may cause r to be re-allocated.   { NTL_zquickmod(&r.rep, b.rep); }long divide(ZZ& q, const ZZ& a, const ZZ& b);// if b | a, sets q = a/b and returns 1; otherwise returns 0.long divide(const ZZ& a, const ZZ& b);// if b | a, returns 1; otherwise returns 0./* non-standard single-precision versions */inline long DivRem(ZZ& q, const ZZ& a, long b)   { return NTL_zsdiv(a.rep, b, &q.rep); } inline long rem(const ZZ& a, long b)   { return NTL_zsmod(a.rep, b); }/* single precision versions */inline void div(ZZ& q, const ZZ& a, long b)   { (void) NTL_zsdiv(a.rep, b, &q.rep); }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, long b);// if b | a, returns 1; otherwise returns 0.inline ZZ operator/(const ZZ& a, const ZZ& b)   { ZZ x; div(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator/(const ZZ& a, long b)   { ZZ x; div(x, a, b); NTL_OPT_RETURN(ZZ, x); }inline ZZ operator%(const ZZ& a, const ZZ& b)   { ZZ x; rem(x, a, b); NTL_OPT_RETURN(ZZ, x); }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线免费观看日韩欧美| 欧美色欧美亚洲另类二区| 成人高清免费观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 综合久久久久久| 蜜桃av噜噜一区| 在线免费观看日本欧美| 国产精品三级视频| 久久国产精品99精品国产 | 日韩免费在线观看| 18成人在线视频| 国产精品一线二线三线精华| 7799精品视频| 亚洲一区二区三区在线播放| 成人精品电影在线观看| 日韩精品中文字幕在线不卡尤物 | 日韩高清在线观看| 色综合久久久久综合99| 国产精品免费视频一区| 国产在线精品一区二区夜色| 日韩一区二区三区精品视频| 亚洲在线一区二区三区| 91在线视频免费观看| 日本一区二区免费在线观看视频 | 国产亚洲精品免费| 免费成人结看片| 欧美久久久影院| 午夜电影久久久| 欧美日韩一区二区在线视频| 亚洲伦理在线精品| 色悠悠久久综合| 亚洲精品一二三区| 日本精品视频一区二区| 亚洲精品成a人| 在线视频欧美区| 亚洲一区二区三区四区在线免费观看 | 成人av在线一区二区三区| 久久精品一区二区三区不卡| 韩国av一区二区三区四区| 精品久久久三级丝袜| 另类小说综合欧美亚洲| 日韩欧美一区二区久久婷婷| 美女视频网站久久| 欧美成人午夜电影| 国产精品123区| 中文字幕av一区二区三区| 99精品欧美一区二区蜜桃免费| 中文字幕亚洲在| 日本乱人伦aⅴ精品| 亚洲第一综合色| 久久综合久色欧美综合狠狠| 亚洲欧美日韩综合aⅴ视频| 国产成人自拍在线| 欧美国产97人人爽人人喊| 高清av一区二区| 国产精品国产三级国产有无不卡| 北岛玲一区二区三区四区| 最新日韩av在线| 97久久精品人人做人人爽50路| 日韩理论片在线| 欧美在线观看一二区| 日本不卡的三区四区五区| 久久久久久毛片| 91伊人久久大香线蕉| 丝袜美腿成人在线| 久久久综合精品| 在线视频国产一区| 欧美在线综合视频| 日韩在线一二三区| 久久精品亚洲麻豆av一区二区 | 亚洲国产精品久久人人爱| 欧美日韩一区在线| 国产免费观看久久| 国产精品免费视频一区| 欧美性淫爽ww久久久久无| 九色综合狠狠综合久久| 日韩理论片在线| 日韩精品一区二区三区视频在线观看| 成人中文字幕合集| 日韩精品一级二级| 自拍偷拍亚洲欧美日韩| 欧美videos大乳护士334| 91论坛在线播放| 精品影视av免费| 一区二区免费看| 亚洲国产高清aⅴ视频| 欧美一区二区性放荡片| 成人av在线播放网址| 毛片av一区二区| 樱桃国产成人精品视频| 国产婷婷色一区二区三区 | 国产宾馆实践打屁股91| 亚洲成人你懂的| 国产精品午夜在线观看| 精品久久久久久最新网址| 婷婷一区二区三区| 国产精品欧美综合在线| 精品久久久久一区二区国产| 欧美精品久久天天躁| 一本到三区不卡视频| 欧美性做爰猛烈叫床潮| 99免费精品在线观看| 国产夫妻精品视频| 国产最新精品免费| 免费在线视频一区| 午夜影视日本亚洲欧洲精品| 国产精品成人免费在线| 国产日韩欧美电影| 久久久久9999亚洲精品| 久久色在线视频| 欧美成人官网二区| 欧美xxx久久| 日韩视频永久免费| 欧美一区二区视频在线观看2022 | 91丨porny丨中文| 成人永久看片免费视频天堂| 国产成人午夜99999| 国产一区二区三区在线观看免费| 欧美日韩亚洲不卡| 99re成人在线| 色综合天天综合在线视频| 成人v精品蜜桃久久一区| 国产精品一区二区三区99| 久久国产精品一区二区| 另类欧美日韩国产在线| 久久精品国产第一区二区三区 | 亚洲精品在线免费观看视频| 日韩一区二区视频| 欧美不卡视频一区| 国产日产欧美一区二区三区| 国产精品国产三级国产专播品爱网| 亚洲图片另类小说| 国产一区欧美日韩| 成人一区二区三区视频| 99国产精品国产精品毛片| 欧洲av在线精品| 在线观看91视频| 538在线一区二区精品国产| 精品国产免费视频| 欧美激情中文不卡| 亚洲综合999| 日韩国产高清在线| 国产aⅴ综合色| 色久综合一二码| 91精品国产乱| 日本一区二区三区在线不卡| 亚洲靠逼com| 青青草97国产精品免费观看| 国产精品亚洲视频| 色婷婷精品久久二区二区蜜臀av | 日本一区二区免费在线| 伊人开心综合网| 韩国女主播成人在线观看| 91麻豆国产香蕉久久精品| 欧美一三区三区四区免费在线看| 国产亚洲成aⅴ人片在线观看| 亚洲国产成人va在线观看天堂| 国产一区二区伦理| 欧美性猛交xxxx乱大交退制版| 精品国产一区久久| 亚洲精品自拍动漫在线| 国产一区二区三区精品视频| 欧美午夜精品一区| 国产精品乱码妇女bbbb| 青青草原综合久久大伊人精品 | 懂色av一区二区三区蜜臀| 在线观看一区二区视频| 国产欧美日韩三区| 日本最新不卡在线| 91黄色免费版| 国产日韩欧美高清| 奇米影视一区二区三区| 在线观看免费亚洲| 最新国产成人在线观看| 国产在线视视频有精品| 欧美日韩一区二区三区四区五区| 国产精品人妖ts系列视频| 久久99精品久久久久婷婷| 欧美撒尿777hd撒尿| 《视频一区视频二区| 国产电影一区二区三区| 日韩三级av在线播放| 亚洲成人自拍偷拍| 91麻豆自制传媒国产之光| 日本一区二区三区在线观看| 国产一区二区三区视频在线播放| 日韩一本二本av| 婷婷综合久久一区二区三区| 欧美中文字幕不卡| 亚洲午夜视频在线观看| 91久久香蕉国产日韩欧美9色| 亚洲人精品午夜| 91视频观看视频| 自拍偷在线精品自拍偷无码专区| 波多野结衣亚洲一区| 国产精品电影一区二区| 成人黄色网址在线观看| 中文字幕一区二区三区蜜月| 不卡一区二区在线| 亚洲欧美偷拍卡通变态|