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

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

?? zz.h

?? 一個比較通用的大數運算庫
?? H
?? 第 1 頁 / 共 4 頁
字號:


#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_NNS




class 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 value

long WideSinglePrecision() const
   { return NTL_zwsptest(rep); }

// tests if less than NTL_WSP_BOUND in absolute value

static 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) 
   { unsigned int res = (unsigned int) NTL_ztouint(a.rep); 
     x = NTL_UINT_TO_INT(res); }

inline int to_int(const ZZ& a)  
   { unsigned int res = (unsigned int) NTL_ztouint(a.rep); 
     return NTL_UINT_TO_INT(res); }

inline void conv(unsigned long& x, const ZZ& a) { x = NTL_ztouint(a.rep); }
inline unsigned 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); }




// ****** comparisons


inline 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 arithmetic


inline 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 remaindering


inline 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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久夜色精品一区| 国产成人午夜电影网| 色婷婷综合久久| 亚洲午夜视频在线观看| 欧美午夜一区二区三区| 亚洲午夜免费电影| 91精品国产色综合久久不卡蜜臀 | 精品亚洲成a人| 欧美精品一区二区久久久| 狂野欧美性猛交blacked| 2021久久国产精品不只是精品| 麻豆国产一区二区| 国产午夜精品一区二区三区视频 | 国产精品久久看| 91福利国产成人精品照片| 亚洲一二三区视频在线观看| 欧美精品成人一区二区三区四区| 韩国av一区二区三区四区| 日本一区二区三区四区| 日本精品免费观看高清观看| 婷婷国产v国产偷v亚洲高清| 国产性做久久久久久| 色婷婷久久久亚洲一区二区三区| 日韩av电影免费观看高清完整版 | 亚洲一区免费视频| 日韩一区二区免费电影| 色天使久久综合网天天| 日日夜夜一区二区| 日本一区二区视频在线| 欧美日韩不卡在线| 国产激情一区二区三区| 亚洲国产欧美日韩另类综合| 久久网站最新地址| 欧洲国内综合视频| 国产最新精品免费| 亚洲妇女屁股眼交7| 国产亚洲福利社区一区| 欧美日韩1234| 国产成人在线视频网址| 午夜国产精品影院在线观看| 中文字幕免费在线观看视频一区| 欧美在线免费视屏| 国产成人日日夜夜| 秋霞电影一区二区| 亚洲精品亚洲人成人网在线播放| 日韩一区二区三区电影在线观看 | 伊人开心综合网| 久久久99精品免费观看不卡| 欧美日韩国产bt| 一本色道久久综合亚洲aⅴ蜜桃| 久久黄色级2电影| 亚洲观看高清完整版在线观看 | 中文字幕一区二| 欧美成va人片在线观看| 欧美丝袜丝交足nylons图片| 成人av在线观| 国产乱一区二区| 日韩va亚洲va欧美va久久| 亚洲精品亚洲人成人网在线播放| 国产亚洲精品7777| 亚洲精品在线电影| 欧美一级片在线看| 欧美精品久久久久久久多人混战 | 亚洲成人在线观看视频| 一色屋精品亚洲香蕉网站| 久久久久久久久免费| 日韩欧美资源站| 欧美二区三区的天堂| 欧美日韩大陆在线| 欧美视频三区在线播放| 在线区一区二视频| 在线视频欧美区| 色爱区综合激月婷婷| 日本高清不卡视频| 色综合天天性综合| 91视频观看视频| av在线综合网| 99精品在线观看视频| 成人av网站免费| 成人视屏免费看| av不卡在线观看| 91麻豆精东视频| 色先锋久久av资源部| 成人av在线电影| 国产成人精品一区二区三区四区 | 青青草国产精品亚洲专区无| 免费成人性网站| 九九九精品视频| 国产麻豆视频一区| 成人在线视频一区二区| 9色porny自拍视频一区二区| 99re这里只有精品首页| 欧美影院一区二区三区| 欧美夫妻性生活| 精品成人一区二区| 国产精品久久久久影院亚瑟| 中文字幕亚洲区| 亚洲国产综合91精品麻豆| 三级欧美韩日大片在线看| 国产亚洲女人久久久久毛片| 国产精品欧美一区二区三区| 国产精品不卡在线| 亚洲国产精品自拍| 久久国产精品第一页| 国产成人精品影视| 欧美亚洲另类激情小说| 欧美成人女星排名| 中文字幕在线不卡视频| 亚洲一二三专区| 国内外成人在线视频| 成人免费av资源| 欧美日韩免费观看一区二区三区| 日韩欧美一区二区不卡| 国产精品麻豆视频| 午夜精品123| 国产福利精品导航| 91久久国产最好的精华液| 日韩欧美的一区| 国产精品久久久久影院| 偷偷要91色婷婷| 粉嫩av一区二区三区粉嫩| 91电影在线观看| 国产欧美一区二区三区网站| 亚洲成在线观看| 国产91在线看| 777xxx欧美| 亚洲视频免费观看| 紧缚奴在线一区二区三区| 色综合 综合色| 精品国产污污免费网站入口 | 色综合久久88色综合天天6| 欧美精品欧美精品系列| 国产精品久久久久久久久图文区| 亚洲成人精品在线观看| 成人免费看黄yyy456| 日韩一区二区影院| 亚洲综合图片区| 国产成人精品免费在线| 欧美一区二区在线不卡| 亚洲精品写真福利| 粉嫩在线一区二区三区视频| 欧美性高清videossexo| 亚洲国产经典视频| 九色|91porny| 日韩一区二区在线看| 亚洲一区欧美一区| 一本色道久久综合亚洲aⅴ蜜桃| 欧美精品一区二区不卡| 日本欧美一区二区三区乱码| 91色九色蝌蚪| 日本一区二区久久| 狠狠色丁香久久婷婷综合_中 | 成人av手机在线观看| 久久综合av免费| 毛片一区二区三区| 欧美福利一区二区| 丝袜美腿一区二区三区| 在线亚洲+欧美+日本专区| 中文字幕一区二区三区av| 国产·精品毛片| 久久人人97超碰com| 久久99久久99| www一区二区| 精品亚洲免费视频| 精品国产乱码久久久久久牛牛| 日韩国产精品91| 3d动漫精品啪啪| 视频一区二区欧美| 欧美精品久久天天躁| 亚洲成a人片在线观看中文| 在线观看www91| 亚洲成人资源网| 欧美一区二区视频在线观看2022| 亚洲成人激情综合网| 777xxx欧美| 久久国产精品99精品国产 | 国产乱色国产精品免费视频| 精品国产一区二区三区忘忧草| 麻豆视频一区二区| 精品国产一区二区国模嫣然| 国产精品2024| 国产精品麻豆网站| 一本久久综合亚洲鲁鲁五月天| 亚洲色图.com| 欧美群妇大交群中文字幕| 婷婷国产在线综合| 精品国产免费一区二区三区四区| 极品少妇xxxx偷拍精品少妇| 久久久久久久久久久久电影| 懂色av中文字幕一区二区三区| 中文在线免费一区三区高中清不卡| 成人污视频在线观看| 国产精品国产精品国产专区不蜜| 日韩一区二区三区av| 亚洲va欧美va人人爽午夜| 日韩一区二区三区视频在线观看| 国产成人精品免费视频网站| 中文字幕在线不卡一区二区三区| 欧美三级在线看| 国产在线国偷精品产拍免费yy|