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

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

?? quad_float.c

?? 密碼大家Shoup寫的數論算法c語言實現
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*Copyright (C) 1997, 1998, 1999, 2000 Victor ShoupThis program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*****************************************************The quad_float package is derived from the doubledouble package ofKeith Briggs.  However, the version employed in NTL has been extensively modified.  Below, I attach the copyright notice from the originaldoubledouble package, which is currently available at    http://www.labs.bt.com/people/briggsk2*****************************************************Copyright (C) 1997 Keith Martin BriggsExcept where otherwise indicated,this program is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public Licenseas published by the Free Software Foundation; either version 2of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*/#include <NTL/quad_float.h>#include <NTL/RR.h>#include <float.h>#include <NTL/new.h>NTL_START_IMPL#if (defined(__GNUC__) && NTL_EXT_DOUBLE && (defined(__i386__) || defined(__i486__) || defined(__i586__)))#if (!defined(NTL_X86_FIX) && !defined(NTL_NO_X86_FIX))#define NTL_X86_FIX#endif#endif#if (NTL_EXT_DOUBLE && !defined(NTL_X86_FIX))#define DOUBLE volatile double#else#define DOUBLE double#endif#ifdef NTL_X86_FIX#define START_FIX \  unsigned short __old_cw, __new_cw; \  asm volatile ("fnstcw %0":"=m" (__old_cw)); \  __new_cw = (__old_cw & ~0x300) | 0x200; \  asm volatile ("fldcw %0": :"m" (__new_cw));#define END_FIX  asm volatile ("fldcw %0": :"m" (__old_cw));#else#define START_FIX#define END_FIX#endifstatic void normalize(quad_float& z, const double& xhi, const double& xlo){START_FIX   DOUBLE u, v;   u = xhi + xlo;   v = xhi - u;   v = v + xlo;   z.hi = u;   z.lo = v;END_FIX}#if (NTL_BITS_PER_LONG >= NTL_DOUBLE_PRECISION)quad_float to_quad_float(long n){START_FIX   DOUBLE xhi, xlo;   DOUBLE u, v;   xhi = double(n);   // Because we are assuming 2's compliment integer   // arithmetic, the following prevents long(xhi) from overflowing.   if (n > 0)      xlo = double(n+long(-xhi));   else      xlo = double(n-long(xhi));   // renormalize...just to be safe     u = xhi + xlo;   v = xhi - u;   v = v + xlo;END_FIX   return quad_float(u, v);}quad_float to_quad_float(unsigned long n){START_FIX   DOUBLE xhi, xlo, t;   DOUBLE u, v;   const double bnd = double(1L << (NTL_BITS_PER_LONG-2))*4.0;   xhi = double(n);      if (xhi >= bnd)      t = xhi - bnd;   else      t = xhi;   long llo = long(n - (unsigned long)(t));   xlo = double(llo);   // renormalize...just to be safe   u = xhi + xlo;   v = xhi - u;   v = v + xlo;END_FIX   return quad_float(u, v);}#endiflong quad_float::oprec = 10;void quad_float::SetOutputPrecision(long p){   if (p < 1) p = 1;   if (p >= (1L << (NTL_BITS_PER_LONG-4)))       Error("quad_float: output precision too big");   oprec = p;}quad_float operator +(const quad_float& x, const quad_float& y ) {START_FIX        DOUBLE    H, h, T, t, S, s, e, f;        DOUBLE    t1;        S = x.hi + y.hi;        T = x.lo + y.lo;        e = S - x.hi;        f = T - x.lo;        t1 = S-e;        t1 = x.hi-t1;        s = y.hi-e;        s = s + t1;                t1 = T-f;        t1 = x.lo-t1;        t = y.lo-f;        t = t + t1;        s = s + T;        H = S + s;        h = S - H;        h = h + s;        h = h + t;        e = H + h;         f = H - e;        f = f + h;END_FIX        return quad_float(e, f);}quad_float& operator +=(quad_float& x, const quad_float& y ) {START_FIX        DOUBLE    H, h, T, t, S, s, e, f;        DOUBLE    t1;        S = x.hi + y.hi;        T = x.lo + y.lo;        e = S - x.hi;        f = T - x.lo;        t1 = S-e;        t1 = x.hi-t1;        s = y.hi-e;        s = s + t1;                t1 = T-f;        t1 = x.lo-t1;        t = y.lo-f;        t = t + t1;        s = s + T;        H = S + s;        h = S - H;        h = h + s;        h = h + t;        e = H + h;         f = H - e;        f = f + h;        x.hi = e;        x.lo = f;END_FIX        return x;}quad_float operator -(const quad_float& x, const quad_float& y ) {START_FIX        DOUBLE    H, h, T, t, S, s, e, f;        DOUBLE    t1, yhi, ylo;        yhi = -y.hi;        ylo = -y.lo;        S = x.hi + yhi;        T = x.lo + ylo;        e = S - x.hi;        f = T - x.lo;        t1 = S-e;        t1 = x.hi-t1;        s = yhi-e;        s = s + t1;                t1 = T-f;        t1 = x.lo-t1;        t = ylo-f;        t = t + t1;        s = s + T;        H = S + s;        h = S - H;        h = h + s;        h = h + t;        e = H + h;         f = H - e;        f = f + h;END_FIX        return quad_float(e, f);}quad_float& operator -=(quad_float& x, const quad_float& y ) {START_FIX	DOUBLE    H, h, T, t, S, s, e, f;        DOUBLE    t1, yhi, ylo;        yhi = -y.hi;        ylo = -y.lo;        S = x.hi + yhi;        T = x.lo + ylo;        e = S - x.hi;        f = T - x.lo;        t1 = S-e;        t1 = x.hi-t1;        s = yhi-e;        s = s + t1;                t1 = T-f;        t1 = x.lo-t1;        t = ylo-f;        t = t + t1;        s = s + T;        H = S + s;        h = S - H;        h = h + s;        h = h + t;        e = H + h;         f = H - e;        f = f + h;        x.hi = e;        x.lo = f;END_FIX        return x;}quad_float operator -(const quad_float& x){START_FIX   DOUBLE xhi, xlo, u, v;   xhi = -x.hi;   xlo = -x.lo;   // it is a good idea to renormalize here, just in case   // the rounding rule depends on sign, and thus we will   // maintain the "normal form" for quad_float's.     u = xhi + xlo;   v = xhi - u;   v = v + xlo;END_FIX   return quad_float(u, v);}quad_float operator *(const quad_float& x,const quad_float& y ) {START_FIX  DOUBLE hx, tx, hy, ty, C, c;  DOUBLE t1, t2;  C = NTL_QUAD_FLOAT_SPLIT*x.hi;  hx = C-x.hi;  c = NTL_QUAD_FLOAT_SPLIT*y.hi;  hx = C-hx;  tx = x.hi-hx;  hy = c-y.hi;  C = x.hi*y.hi;  hy = c-hy;  ty = y.hi-hy;  // c = ((((hx*hy-C)+hx*ty)+tx*hy)+tx*ty)+(x.hi*y.lo+x.lo*y.hi);    t1 = hx*hy;  t1 = t1-C;  t2 = hx*ty;  t1 = t1+t2;  t2 = tx*hy;  t1 = t1+t2;  t2 = tx*ty;  c = t1+t2;  t1 = x.hi*y.lo;  t2 = x.lo*y.hi;  t1 = t1+t2;  c = c + t1;  hx = C+c;  tx = C-hx;  tx = tx+c;END_FIX  return quad_float(hx, tx);}quad_float& operator *=(quad_float& x,const quad_float& y ) {START_FIX  DOUBLE hx, tx, hy, ty, C, c;  DOUBLE t1, t2;  C = NTL_QUAD_FLOAT_SPLIT*x.hi;  hx = C-x.hi;  c = NTL_QUAD_FLOAT_SPLIT*y.hi;  hx = C-hx;  tx = x.hi-hx;  hy = c-y.hi;  C = x.hi*y.hi;  hy = c-hy;  ty = y.hi-hy;  // c = ((((hx*hy-C)+hx*ty)+tx*hy)+tx*ty)+(x.hi*y.lo+x.lo*y.hi);    t1 = hx*hy;  t1 = t1-C;  t2 = hx*ty;  t1 = t1+t2;  t2 = tx*hy;  t1 = t1+t2;  t2 = tx*ty;  c = t1+t2;  t1 = x.hi*y.lo;  t2 = x.lo*y.hi;  t1 = t1+t2;  c = c + t1;  hx = C+c;  tx = C-hx;  tx = tx+c;  x.hi = hx;  x.lo = tx;END_FIX  return x;}quad_float operator /(const quad_float& x, const quad_float& y ) {START_FIX  DOUBLE hc, tc, hy, ty, C, c, U, u;  DOUBLE t1;  C = x.hi/y.hi;  c = NTL_QUAD_FLOAT_SPLIT*C;  hc = c-C;  u = NTL_QUAD_FLOAT_SPLIT*y.hi;  hc = c-hc;  tc = C-hc;  hy = u-y.hi;  U = C * y.hi;  hy = u-hy;  ty = y.hi-hy;  // u = (((hc*hy-U)+hc*ty)+tc*hy)+tc*ty;  u = hc*hy;  u = u-U;  t1 = hc*ty;  u = u+t1;  t1 = tc*hy;  u = u+t1;  t1 = tc*ty;  u = u+t1;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97超碰欧美中文字幕| 免费在线观看一区二区三区| 成人午夜视频免费看| 久久精品人人爽人人爽| 国产伦精一区二区三区| 久久精品一区二区| 成人av网在线| 自拍av一区二区三区| 一本一道波多野结衣一区二区| 伊人色综合久久天天| 精品视频1区2区3区| 免费视频最近日韩| 精品福利在线导航| 成人一级片在线观看| 日韩码欧中文字| 欧美绝品在线观看成人午夜影视| 首页国产欧美日韩丝袜| 26uuu国产日韩综合| 国产91丝袜在线播放| 亚洲在线视频一区| 在线成人免费视频| 国产精品一区二区久久精品爱涩| 亚洲国产精品v| 一本一道综合狠狠老| 日本午夜精品视频在线观看 | 国产高清在线精品| 国产精品三级av在线播放| 在线视频综合导航| 国产一区啦啦啦在线观看| 亚洲视频狠狠干| 欧美一区二区三区电影| 成人小视频在线| 日韩影院免费视频| 中文一区二区在线观看| 欧美日韩一区高清| 粉嫩久久99精品久久久久久夜 | 久久九九久精品国产免费直播| 色婷婷国产精品| 久久超级碰视频| 一区二区三区四区亚洲| 日韩精品一区二区三区在线观看 | 亚洲同性同志一二三专区| 欧美日韩aaaaaa| 国产成人亚洲综合a∨猫咪| 亚洲高清不卡在线| 国产精品乱人伦中文| 精品国产乱码久久久久久久久| 色丁香久综合在线久综合在线观看| 国产一区啦啦啦在线观看| 亚洲成人高清在线| 国产精品国产三级国产普通话99| 欧美岛国在线观看| 欧美日韩国产影片| 99国产精品久久| 国产一区二区三区免费播放| 五月婷婷久久综合| 亚洲一区成人在线| 欧美国产日韩在线观看| 久久综合九色综合久久久精品综合| 欧美日韩国产系列| 日本久久电影网| 97精品久久久久中文字幕| 成人精品国产一区二区4080| 韩国精品一区二区| 韩国欧美国产一区| 久久99精品久久久久久国产越南| 日本亚洲天堂网| 视频一区在线播放| 偷偷要91色婷婷| 婷婷综合另类小说色区| 亚洲一区二区三区影院| 一区二区理论电影在线观看| 一区二区在线看| 一区二区成人在线| 亚洲免费资源在线播放| 一区二区三区精品| 一区二区欧美在线观看| 亚洲成人资源网| 五月婷婷久久综合| 日本亚洲电影天堂| 精品一区在线看| 国内精品伊人久久久久av影院| 精品一区二区三区免费| 国产在线播放一区三区四| 国产精品自拍在线| 国产91丝袜在线18| av一区二区三区在线| 日本伦理一区二区| 在线播放91灌醉迷j高跟美女| 欧美裸体一区二区三区| 日韩女优视频免费观看| 国产亚洲综合av| 中文字幕一区日韩精品欧美| 亚洲视频一区在线观看| 亚洲mv在线观看| 蜜桃视频免费观看一区| 国产美女娇喘av呻吟久久| 成人av高清在线| 欧美日韩一区二区三区四区五区| 9191精品国产综合久久久久久| 日韩免费在线观看| 国产精品青草久久| 亚洲主播在线观看| 激情综合网av| 不卡的av中国片| 制服丝袜中文字幕亚洲| www国产亚洲精品久久麻豆| 国产精品久久久久久久久搜平片 | 欧美一区永久视频免费观看| 日韩精品一区二区三区在线| 国产精品久久久久久久久搜平片 | 久久97超碰国产精品超碰| 国产精品一区二区视频| 一本久久a久久精品亚洲| 欧美日韩国产免费一区二区| 国产亚洲欧美在线| 亚洲福利视频导航| 国产99久久精品| 欧美精品丝袜中出| 日本一区二区三区久久久久久久久不 | 婷婷国产在线综合| 国产精品一区二区免费不卡| 欧美性生活大片视频| 久久久综合视频| 亚洲国产精品一区二区久久恐怖片| 久久精品国产亚洲一区二区三区| 99re成人精品视频| 日韩免费高清视频| 亚洲一区二区三区四区在线| 国产成人精品在线看| 69久久99精品久久久久婷婷| 国产精品激情偷乱一区二区∴| 美女一区二区久久| 欧美午夜精品一区二区蜜桃| 亚洲国产高清在线| 九一九一国产精品| 欧美性色综合网| 中文字幕一区二区三区不卡| 美女网站一区二区| 欧美福利一区二区| 亚洲精品国产精品乱码不99| 丰满放荡岳乱妇91ww| 日韩午夜在线观看| 天天综合网 天天综合色| 91麻豆swag| 国产精品久久久久久久岛一牛影视| 乱一区二区av| 91精品国产色综合久久| 亚洲二区视频在线| 91麻豆精品在线观看| 国产精品久久久久久久久果冻传媒| 韩国精品主播一区二区在线观看| 欧美一三区三区四区免费在线看| 亚洲一区成人在线| 在线影院国内精品| 亚洲精品五月天| 99视频在线精品| 国产精品久久毛片a| 国产**成人网毛片九色 | 国产精品久久久久久久久免费丝袜 | 99精品久久只有精品| 国产欧美一区二区在线观看| 黑人巨大精品欧美黑白配亚洲| 欧美成人r级一区二区三区| 青青草精品视频| 日韩精品一区二区在线观看| 久久精品国产亚洲一区二区三区| 制服视频三区第一页精品| 亚洲成人一区二区在线观看| 欧洲一区在线电影| 亚洲国产日韩精品| 欧美日韩国产美| 男女激情视频一区| 日韩欧美久久久| 国产高清精品网站| 国产精品欧美经典| 色哟哟国产精品| 亚洲国产成人av| 欧美大片日本大片免费观看| 国内精品久久久久影院薰衣草 | 91亚洲午夜精品久久久久久| 亚洲欧美日韩中文播放| 欧美系列在线观看| 日韩一区精品视频| 欧美大片一区二区| 成人黄色国产精品网站大全在线免费观看| 国产精品每日更新在线播放网址| 一本久久精品一区二区| 视频一区二区中文字幕| 精品福利视频一区二区三区| 成人丝袜高跟foot| 亚洲午夜久久久| 久久综合国产精品| 91视频.com| 美腿丝袜亚洲综合| 国产精品女主播在线观看| 欧美日韩精品一区二区| 久久99国产精品久久99| 国产精品久久久久久久久果冻传媒| 欧美午夜一区二区三区|