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

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

?? tour-impl.html

?? 大數(shù)運(yùn)算類
?? HTML
字號(hào):
<html>
<head>
<title>
A Tour of NTL: NTL Implementation and Portability  </title>
</head>

<body bgcolor="#fff9e6">
<center>
<a href="tour-win.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a>
 <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> 
<a href="tour-gmp.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a>
</center>

<h1> 
<p align=center>
A Tour of NTL: NTL Implementation and Portability 
</p>
</h1>

<p> <hr> <p>

NTL is designed to be portable, fast,
and relatively easy to use and extend.

<p>
To make NTL portable, no assembly code is used (well, almost none, see below).
This is highly desirable, as architectures are constantly
changing and evolving, and maintaining assembly
code is quite costly.
By avoiding assembly code, NTL should remain usable,
with virtually no maintenance, for many years.

<p>

<h3>Minimal platform requirements</h3>

When the configuration flags <tt>NTL_CLEAN_INT</tt>
and <tt>NTL_CLEAN_PTR</tt> are both <i>on</i> (this is not the default,
see below),
NTL makes two requirements
of its platform,
neither of which are guaranteed by the <tt>C++</tt> language
definition, but are essentially universal:

<ol>
<li>
<tt>int</tt> and <tt>long</tt> quantities, respectively, 
are represented using a 2's complement
representation whose width is equal to the width of <tt>unsigned int</tt>
and <tt>unsigned long</tt>, respectively.
<li>
Double precision floating point
conforms to the IEEE floating point standard.
</ol>

<p>
NTl makes very conservative requirements of the <tt>C/C++</tt> compiler:
<ul>
<li>
it is assumed that the <tt>C</tt> compiler conforms to the original
ANSI <tt>C</tt> standard,
<li>
it is assumed that the <tt>C++</tt> compiler supports all of the
language features described in the <i>second</i> edition of Stroustrup's book,
minus exceptions, templates, and derived types.
</ul>


<p>

<h3>The <tt>NTL_CLEAN_INT</tt> flag</h3>

<p>

The configuration flag <tt>NTL_CLEAN_INT</tt> 
is currently <i>off</i> by default.

<p>
When this flag is off, NTL makes another requirement of its platform;
namely, that arithmetic operations on the type <tt>long</tt>
do not overflow, but simply "wrap around" modulo the word size.
This behavior is <i>not</i> guaranteed by the <tt>C++</tt> standard,
and yet it is essentially universally implemented.
In fact, most compilers will go out of their way to ensure this behavior,
since it is a very reasonable behavior, and since many programs 
implicitly rely on this behavior.

<p>
Making this "wrap around" assumption can lead to somewhat more efficient code
on some platforms.
It seems fairly unlikely that one would ever have to turn the
<tt>NTL_CLEAN_INT</tt> flag <i>on</i>, but it seems a good idea
to make this possible, and at the very least 
to identify and isolate the code that
relies on this assumption.
<p>

<h3>The <tt>NTL_CLEAN_PTR</tt> flag</h3>

<p>

The configuration flag <tt>NTL_CLEAN_PTR</tt> 
is currently <i>off</i> by default.

<p>
When this flag is off, NTL makes another requirement of its platform;
namely, that the address space is "flat", and in particular,
that one can test if an object pointed to by a pointer <tt>p</tt>
is located in a array of objects <tt>v[0..n-1]</tt> by testing
if <tt>p &gt;= v</tt> and <tt>p &lt; v + n</tt>.
The <tt>C++</tt> standard does not guarantee that such a test will
work;   the only way to perform this test in a standard-conforming way
is to iteratively test if <tt>p == v</tt>, <tt>p == v+1</tt>, etc.

<p>
This assumption of a "flat" address space is essentially universally 
valid, and making this assumption leads to some more efficient code.
For this reason, the <tt>NTL_CLEAN_PTR</tt> is <i>off</i> by default,
but one can always turn it on, and in fact, the overall performance
penalty should be negligible for most applications.



<h3>Some floating point issues</h3>


<p>
Relying on floating point may seem prone to errors,
but with the guarantees provided by the IEEE standard,
one can prove the correctness of the NTL code that uses floating point.

<p>
Briefly, the IEEE floating point standard says that basic arithmetic operations
on doubles should work <i>as if</i> the operation were performed with infinite
precision, and then rounded to <tt>p</tt> bits,
where <tt>p</tt> is the precision (typically, <tt>p = 53</tt>).


<p>
Throughout most of NTL, correctness follows from weaker assumptions,
namely
<p>
<ul>
<li>
basic arithmetic operations and conversion from integral types 
produce results with a <i>relative error</i> of 
<tt>2^{-p + 1}</tt> (assuming no overflow),
<li>
multiplication by powers of 2 produce <i>exact</i> results (assuming no overflow),
<li>
basic arithmetic operations on integers represented as doubles and conversions from integral types
to doubles produce <i>exact</i> results, provided the inputs and outputs
are less than <tt>2^p</tt> in absolute value,
<li>
if <tt>y/2 &lt;= x &lt;= 2y</tt>, then <tt>x-y</tt> is computed exactly.
</ul>
Also, NTL allows the compiler to compute <tt>z = x/y</tt> as 
<tt>t = 1/y</tt>, <tt>z = t*x</tt>.

<p>
One big problem with the IEEE standard is that it allows intermediate
quantities to be computed in a higher precision than the standard
double precision.
This "looseness" in the standard is a substantial impediment to
creating portable software.
Most platforms today implement the "strict" IEEE standard, with no
excess precision.
One notable exception -- the 800 pound gorilla, so to speak -- 
is the Intel x86.

<p>
NTL goes out of its way to ensure that its code is correct with
both "strict" and "loose" IEEE floating point.
This is achieved in a portable fashion throughout NTL, except
for the <tt>quad_float</tt> module, where some desperate hacks,
including assembly code, may be used
to try to work around problems created by "loose" IEEE floating point
<a href="quad_float.txt">[more details]</a>.
But note that even if the <tt>quad_float</tt> package does not work correctly
because of these problems, the only other routines that are affected
are the <tt>LLL_QP</tt> routines in the <tt>LLL</tt> module -- the
rest of NTL should work fine.



<p>
Note that NTL <i>does</i> require that the IEEE floating point 
special quantities "infinity"
and "not a number" are implemented correctly.

<p>
<h3>Implementing long integer arithmetic</h3>
<p>
There are three basic strategies for implementing long integer arithmetic.

<p>
The <i>default</i> strategy is implemented in the 
<i>traditional long integer arithmetic package</i>.
This package is derived from the LIP package originally developed by
A. K. Lenstra, although it has evolved quite a bit within NTL.
This package uses no assembly code and is very portable.

<p>
The <i>second</i> strategy is to use the Gnu Multi-Precision Package (GMP)
as a <i>supplemental long integer arithmetic package</i>.
In this strategy, the representation of long integers is identical
to that in he traditional long integer package.
This representation is incompatible with the GMP representation,
and on-the-fly conversions are done between the two representations
(only when this is sensible).
This strategy typically yields better performance, but requires
that GMP is installed on your platform.

<p>
The <i>third</i> strategy is to use GMP as the 
<i>primary long integer arithmetic package</i>.
In this strategy, the representation of long integers is in a 
form compatible with GMP.
This strategy typically yields the best performance,
but requires
that GMP is installed on your platform, and also
introduces some minor backward incompatibilities in the programming
interface.

<p>
<a href="tour-gmp.html">Go here</a> for more details on the use
of GMP with NTL.

<p>
<h3>Algorithms</h3>
<p>
NTL makes fairly consistent use of asymptotically fast algorithms.

<p>
Long integer multiplication is implemented using the classical
algorithm, crossing over to Karatsuba for very big numbers.
Long integer division is currently only implemented using
the classical algorithm -- unless you use NTL with GMP (version 3 or later)
as either a supplemental or primary long integer package,
which
employs an algorithm that is about twice as slow as multiplication
for very large numbers.
<p>
Polynomial multiplication and division is carried out
using a combination of the classical algorithm, Karatsuba,
the FFT using small primes, and the FFT using the Schoenhagge-Strassen
approach.
The choice of algorithm depends on the coefficient domain.
<p>
Many algorithms employed throughout NTL are inventions
of the author (<a href="http://www.shoup.net">Victor Shoup</a>) 
and his colleagues 
<a href="http://math-www.uni-paderborn.de/~aggathen/joachim.html">Joachim von zur Gathen</a>
and
<a href="http://www4.ncsu.edu/~kaltofen">Erich Kaltofen</a>,
as well as <a href="mailto:abbott@dima.unige.it">John Abbott</a>
and
<a href="http://www.loria.fr/~zimmerma">Paul Zimmermann</a>.

<p>
<h3>
Some of NTL's imperfections
</h3>
<p>

NTL is not a "perfect" library.
Here are some limitations of NTL that a "perfect" library would not have:
<p>
<ul>
<li>
NTL is neither thread-safe nor re-entrant, and making it so 
would require a fundamental redesign.
<p>

<li>
NTL provides only a very crude form of error handling:
print an error message and abort.
For most NTL users, this is quite sufficient.
The alternative would be to have NTL throw exceptions.
Writing code that handles exceptions correctly is quite difficult.
The easy part is throwing and catching exceptions.
The hard part is writing code <i>through which</i> an exception
can be safely and correctly thrown.
Retrofitting NTL to throw exceptions at this late date
would be quite difficult and error prone, and I do not think
that there is much demand for it.

<p>

<li>
NTL does not release all of its resources.
There are some routines which for efficiency reasons will
allocate some memory and never give it back to the system,
so as to avoid re-allocations on subsequent calls.
The amount of memory "stolen" by NTL in this way is fairly reasonable,
and I have heard no complaints yet about its effects.

</ul>


<p>

<center>
<a href="tour-win.html"><img src="arrow1.gif" alt="[Previous]" align=bottom></a>
 <a href="tour.html"><img src="arrow2.gif" alt="[Up]" align=bottom></a> 
<a href="tour-gmp.html"> <img src="arrow3.gif" alt="[Next]" align=bottom></a>
</center>


</body>
</html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
水蜜桃久久夜色精品一区的特点| 男女男精品视频网| 欧美精品免费视频| 国产成人8x视频一区二区| 亚洲国产精品嫩草影院| 久久精品视频免费| 欧美日韩精品一区二区三区蜜桃 | 亚洲综合图片区| 久久综合一区二区| 欧美日韩一区二区电影| 99在线热播精品免费| 青草国产精品久久久久久| 亚洲精品欧美综合四区| 中文字幕欧美激情一区| 精品欧美黑人一区二区三区| 欧美少妇一区二区| 91香蕉国产在线观看软件| 激情都市一区二区| 日韩电影在线免费| 亚洲大片免费看| 亚洲精品乱码久久久久| 亚洲欧美综合在线精品| 国产午夜亚洲精品午夜鲁丝片 | 国产经典欧美精品| 日本美女视频一区二区| 香蕉成人伊视频在线观看| 中文字幕一区二区三区精华液| 日韩视频免费直播| 欧美一级在线观看| 在线播放欧美女士性生活| 欧美最猛黑人xxxxx猛交| 91亚洲国产成人精品一区二区三 | 亚洲成人激情综合网| 亚洲男同性视频| 亚洲婷婷在线视频| 国产精品黄色在线观看| 中文字幕第一区第二区| 国产亚洲美州欧州综合国| 久久综合久久鬼色| 久久人人爽爽爽人久久久| 精品久久久久久无| 精品国产一区二区三区久久久蜜月 | 国产欧美久久久精品影院| 久久人人超碰精品| 久久九九国产精品| 国产精品另类一区| 国产精品久久午夜| 亚洲三级视频在线观看| 亚洲美女一区二区三区| 夜色激情一区二区| 亚洲成人资源在线| 久久91精品久久久久久秒播| 精品伊人久久久久7777人| 国产自产2019最新不卡| 国产成人免费视频| 不卡的av在线播放| 色综合婷婷久久| 在线精品国精品国产尤物884a| 在线欧美日韩国产| 91精品国产91久久久久久最新毛片| 欧美一级一区二区| 精品国产乱码久久久久久蜜臀| 久久久久99精品国产片| 亚洲国产精品v| 一区二区三区在线免费观看| 午夜欧美电影在线观看| 久久99精品久久久久久国产越南| 国产一区日韩二区欧美三区| 成人av网址在线| 在线免费观看成人短视频| 91超碰这里只有精品国产| 欧美成人精品福利| 国产精品不卡在线| 亚洲成国产人片在线观看| 精品一区二区在线观看| 成人精品亚洲人成在线| 欧美日韩国产首页| 久久久久久久久久看片| 一区二区在线观看av| 秋霞午夜av一区二区三区| 国产成人一级电影| 欧美自拍偷拍午夜视频| 久久综合九色欧美综合狠狠| 自拍偷拍亚洲欧美日韩| 日韩二区三区四区| 成人av在线影院| 亚洲欧美综合在线精品| 水野朝阳av一区二区三区| 岛国av在线一区| 制服丝袜亚洲播放| 国产精品久久夜| 久久99国产乱子伦精品免费| 色av成人天堂桃色av| 久久噜噜亚洲综合| 午夜精品123| 91免费视频网| 久久亚洲综合色一区二区三区| 亚洲一线二线三线视频| 丁香婷婷深情五月亚洲| 日韩一级免费一区| 亚洲精品日产精品乱码不卡| 国产激情一区二区三区| 91麻豆精品国产无毒不卡在线观看| 国产精品传媒视频| 国产一区二区三区久久悠悠色av| 欧美视频完全免费看| 国产精品女主播在线观看| 喷水一区二区三区| 在线观看www91| 国产精品二区一区二区aⅴ污介绍| 奇米一区二区三区| 欧美色图天堂网| 中文字幕亚洲不卡| 国产精品99久久久| 欧美成人女星排行榜| 日本欧美肥老太交大片| 欧美日韩在线播放| 玉米视频成人免费看| 成人av综合一区| 中文字幕欧美国产| 国产高清精品网站| 久久在线观看免费| 久久疯狂做爰流白浆xx| 91精品国产入口在线| 亚洲国产精品久久艾草纯爱| 91传媒视频在线播放| 亚洲三级免费观看| 色悠悠亚洲一区二区| 亚洲日本在线天堂| 91麻豆福利精品推荐| 成人欧美一区二区三区| 成人av电影在线| 国产精品美女一区二区| 丁香五精品蜜臀久久久久99网站 | 国产在线精品一区二区夜色| 欧美一区二区福利视频| 日本不卡不码高清免费观看| 欧美精品乱码久久久久久按摩| 亚洲狠狠爱一区二区三区| 欧美在线观看你懂的| 怡红院av一区二区三区| 欧洲一区二区三区在线| 亚洲一区二区精品3399| 欧美日韩在线播| 日本欧美加勒比视频| 精品久久人人做人人爱| 国产精品一区二区三区99| 国产丝袜在线精品| 99精品黄色片免费大全| 伊人开心综合网| 欧美日韩精品系列| 七七婷婷婷婷精品国产| 久久久久久亚洲综合影院红桃| 国产69精品久久久久777| 国产精品美女久久久久av爽李琼| 成人av在线资源| 亚洲自拍欧美精品| 欧美一区二区三区视频免费| 黑人精品欧美一区二区蜜桃| 国产午夜三级一区二区三| aaa欧美日韩| 亚洲18影院在线观看| 欧美一二三区在线观看| 国产黄人亚洲片| 亚洲人成网站色在线观看 | 精品成a人在线观看| 国产91丝袜在线观看| 国产v日产∨综合v精品视频| 国产精品高潮呻吟久久| 日本福利一区二区| 蜜臀av亚洲一区中文字幕| 国产欧美一区二区三区在线看蜜臀 | 日韩电影免费在线| 久久久亚洲国产美女国产盗摄| 94-欧美-setu| 亚洲mv大片欧洲mv大片精品| xfplay精品久久| 色呦呦网站一区| 久久国产精品99久久人人澡| 国产精品国产三级国产aⅴ原创| 欧美在线免费播放| 国产精品一区二区久久精品爱涩 | 视频一区二区国产| 国产农村妇女毛片精品久久麻豆| 在线精品亚洲一区二区不卡| 国产一区二区三区四区在线观看| 亚洲免费成人av| 精品国产乱码久久久久久图片| 色94色欧美sute亚洲线路二| 九九精品一区二区| 亚洲二区在线观看| 国产欧美日本一区视频| 日韩一区二区三区视频| 色综合视频一区二区三区高清| 免费观看久久久4p| 亚洲一区二三区| 老鸭窝一区二区久久精品| 亚洲激情第一区| 国产日韩欧美综合在线| 日韩一卡二卡三卡四卡|