-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreface.html
280 lines (248 loc) · 19.7 KB
/
Preface.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Preface — THE END of ERROR - Unum Computing 0.1 documentation</title>
<link rel="stylesheet" href="_static/material-design-lite-1.3.0/material.blue-deep_orange.min.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinx_materialdesign_theme.css" type="text/css" />
<link rel="stylesheet" href="_static/fontawesome/all.css" type="text/css" />
<link rel="stylesheet" href="_static/fonts.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/basic.css" />
<link rel="stylesheet" type="text/css" href="_static/d2l.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/d2l.js"></script>
<script async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="如何读这本书" href="00_how_to_read.html" />
<link rel="prev" title="THE END of ERROR - Unum Computing" href="index.html" />
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer"><header class="mdl-layout__header mdl-layout__header--waterfall ">
<div class="mdl-layout__header-row">
<nav class="mdl-navigation breadcrumb">
<a class="mdl-navigation__link is-active">Preface</a>
</nav>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation">
<form class="form-inline pull-sm-right" action="search.html" method="get">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable mdl-textfield--floating-label mdl-textfield--align-right">
<label id="quick-search-icon" class="mdl-button mdl-js-button mdl-button--icon" for="waterfall-exp">
<i class="material-icons">search</i>
</label>
<div class="mdl-textfield__expandable-holder">
<input class="mdl-textfield__input" type="text" name="q" id="waterfall-exp" placeholder="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</div>
</div>
<div class="mdl-tooltip" data-mdl-for="quick-search-icon">
Quick search
</div>
</form>
<a id="button-show-source"
class="mdl-button mdl-js-button mdl-button--icon"
href="_sources/Preface.rst.txt" rel="nofollow">
<i class="material-icons">code</i>
</a>
<div class="mdl-tooltip" data-mdl-for="button-show-source">
Show Source
</div>
</nav>
</div>
<div class="mdl-layout__header-row header-links">
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="https://github.com/jszheng/TheEndOfError">
<i class="fab fa-github"></i>
Github
</a>
</nav>
</div>
</header><header class="mdl-layout__drawer">
<!-- Title -->
<span class="mdl-layout-title">
<a class="title" href="index.html">
<span class="title-text">
THE END of ERROR - Unum Computing
</span>
</a>
</span>
<div class="globaltoc">
<span class="mdl-layout-title toc">Table Of Contents</span>
<nav class="mdl-navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Preface</a></li>
<li class="toctree-l1"><a class="reference internal" href="00_how_to_read.html">如何读这本书</a></li>
<li class="toctree-l1"><a class="reference internal" href="Part1.html">Part 1 一种新的数字格式Unum</a></li>
<li class="toctree-l1"><a class="reference internal" href="01_Overview.html">1 概论</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_BuildUpUnumFormat.html">2. 构造unum的格式</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_TheOriginalSin.html">3. 计算机算术的原罪</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_unum_format.html">4. 完整的unum格式定义</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_hidden_scratchpads_3_layers.html">5. 隐藏的草稿本和三个层次</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_info_per_bit.html">6 每个比特的信息</a></li>
<li class="toctree-l1"><a class="reference internal" href="07_fixed_size_unum_storage.html">7 定长的unum存储</a></li>
<li class="toctree-l1"><a class="reference internal" href="08_comparison_operations.html">8 比较操作</a></li>
<li class="toctree-l1"><a class="reference internal" href="09_add_sub_unbias_round.html">9 加减法和无偏差舍入的迷</a></li>
<li class="toctree-l1"><a class="reference internal" href="10_mul_div.html">10 乘法和除法</a></li>
<li class="toctree-l1"><a class="reference internal" href="11_power.html">11 求幂</a></li>
<li class="toctree-l1"><a class="reference internal" href="12_other_important_unary_ops.html">12 其他重要的一元运算</a></li>
<li class="toctree-l1"><a class="reference internal" href="13_fused_operations.html">13 融合操作(一次性表达式)</a></li>
<li class="toctree-l1"><a class="reference internal" href="14_trial_runs.html">14 试运行:Unums 面临计算挑战</a></li>
<li class="toctree-l1"><a class="reference internal" href="part1_summary.html">小结</a></li>
<li class="toctree-l1"><a class="reference internal" href="Part2.html">Part 2 - 一种新的解决方法 Ubox</a></li>
<li class="toctree-l1"><a class="reference internal" href="15_TheOtherKindOfError.html">15. 另外一种误差</a></li>
<li class="toctree-l1"><a class="reference internal" href="16_avoid_interval_arith_pitfalls.html">16 避免区间算术陷阱</a></li>
<li class="toctree-l1"><a class="reference internal" href="17_meaning_of_solve_equ.html">17 “解”方程到底是什么意思?</a></li>
<li class="toctree-l1"><a class="reference internal" href="18_permission_to_guess.html">18 准许猜测</a></li>
<li class="toctree-l1"><a class="reference internal" href="19_pendulums_done_correctly.html">19 摆的正确计算</a></li>
<li class="toctree-l1"><a class="reference internal" href="20_two_body_problem.html">20 二体问题(以及多体问题)</a></li>
<li class="toctree-l1"><a class="reference internal" href="21_calculus_evil.html">21 微积分被认为是邪恶的:离散物理</a></li>
<li class="toctree-l1"><a class="reference internal" href="22_end_of_error.html">22 错误的终结</a></li>
<li class="toctree-l1"><a class="reference internal" href="Glossary.html">词汇表</a></li>
</ul>
</nav>
</div>
</header>
<main class="mdl-layout__content" tabIndex="0">
<script type="text/javascript" src="_static/sphinx_materialdesign_theme.js "></script>
<header class="mdl-layout__drawer">
<!-- Title -->
<span class="mdl-layout-title">
<a class="title" href="index.html">
<span class="title-text">
THE END of ERROR - Unum Computing
</span>
</a>
</span>
<div class="globaltoc">
<span class="mdl-layout-title toc">Table Of Contents</span>
<nav class="mdl-navigation">
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Preface</a></li>
<li class="toctree-l1"><a class="reference internal" href="00_how_to_read.html">如何读这本书</a></li>
<li class="toctree-l1"><a class="reference internal" href="Part1.html">Part 1 一种新的数字格式Unum</a></li>
<li class="toctree-l1"><a class="reference internal" href="01_Overview.html">1 概论</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_BuildUpUnumFormat.html">2. 构造unum的格式</a></li>
<li class="toctree-l1"><a class="reference internal" href="03_TheOriginalSin.html">3. 计算机算术的原罪</a></li>
<li class="toctree-l1"><a class="reference internal" href="04_unum_format.html">4. 完整的unum格式定义</a></li>
<li class="toctree-l1"><a class="reference internal" href="05_hidden_scratchpads_3_layers.html">5. 隐藏的草稿本和三个层次</a></li>
<li class="toctree-l1"><a class="reference internal" href="06_info_per_bit.html">6 每个比特的信息</a></li>
<li class="toctree-l1"><a class="reference internal" href="07_fixed_size_unum_storage.html">7 定长的unum存储</a></li>
<li class="toctree-l1"><a class="reference internal" href="08_comparison_operations.html">8 比较操作</a></li>
<li class="toctree-l1"><a class="reference internal" href="09_add_sub_unbias_round.html">9 加减法和无偏差舍入的迷</a></li>
<li class="toctree-l1"><a class="reference internal" href="10_mul_div.html">10 乘法和除法</a></li>
<li class="toctree-l1"><a class="reference internal" href="11_power.html">11 求幂</a></li>
<li class="toctree-l1"><a class="reference internal" href="12_other_important_unary_ops.html">12 其他重要的一元运算</a></li>
<li class="toctree-l1"><a class="reference internal" href="13_fused_operations.html">13 融合操作(一次性表达式)</a></li>
<li class="toctree-l1"><a class="reference internal" href="14_trial_runs.html">14 试运行:Unums 面临计算挑战</a></li>
<li class="toctree-l1"><a class="reference internal" href="part1_summary.html">小结</a></li>
<li class="toctree-l1"><a class="reference internal" href="Part2.html">Part 2 - 一种新的解决方法 Ubox</a></li>
<li class="toctree-l1"><a class="reference internal" href="15_TheOtherKindOfError.html">15. 另外一种误差</a></li>
<li class="toctree-l1"><a class="reference internal" href="16_avoid_interval_arith_pitfalls.html">16 避免区间算术陷阱</a></li>
<li class="toctree-l1"><a class="reference internal" href="17_meaning_of_solve_equ.html">17 “解”方程到底是什么意思?</a></li>
<li class="toctree-l1"><a class="reference internal" href="18_permission_to_guess.html">18 准许猜测</a></li>
<li class="toctree-l1"><a class="reference internal" href="19_pendulums_done_correctly.html">19 摆的正确计算</a></li>
<li class="toctree-l1"><a class="reference internal" href="20_two_body_problem.html">20 二体问题(以及多体问题)</a></li>
<li class="toctree-l1"><a class="reference internal" href="21_calculus_evil.html">21 微积分被认为是邪恶的:离散物理</a></li>
<li class="toctree-l1"><a class="reference internal" href="22_end_of_error.html">22 错误的终结</a></li>
<li class="toctree-l1"><a class="reference internal" href="Glossary.html">词汇表</a></li>
</ul>
</nav>
</div>
</header>
<div class="document">
<div class="page-content" role="main">
<div class="section" id="preface">
<h1>Preface<a class="headerlink" href="#preface" title="Permalink to this heading">¶</a></h1>
<div class="figure align-default" id="id1">
<img alt="_images/image-20200624170950368.png" src="_images/image-20200624170950368.png" />
<p class="caption"><span class="caption-number">Fig. 2 </span><span class="caption-text">Prof Saffman</span><a class="headerlink" href="#id1" title="Permalink to this image">¶</a></p>
</div>
<p>“<strong>数学的目的是消除思考。</strong>”菲利普·萨夫曼(Philip G.
Saffman,1931年-2008年)</p>
<p>1978年,萨夫曼教授在一次课堂演讲中说这句话的时候,全场大笑。这堂课是加州理工学院许多专业都要求主修的应用数学本科三年级课程,大家普遍认为是很难的一门课程。所以当时的数学肯定在“消灭思考”方面失败了。</p>
<p>但是Saffman的观察是明智而深刻的。数学家建立的详尽的抽象结构使人们不必“思考”他们要解决的问题。一旦完成数学工作,只需遵循规则即可解决问题。随着自动计算的出现,我们甚至不必遵循规则。我们可以让计算机做到这一点。假设计算机算术遵循数学规则,就可以安全地在坚固的基础之上构建庞大的结构。</p>
<p>但是目前在计算机上执行哪怕即便是简单算术的规则,也<strong>不是</strong>真正数学意义上的,因此,我们仍然必须思考。拿起任何袖珍计算器,将1除以3,您将看到类似以下内容:</p>
<div class="figure align-default" id="id2">
<img alt="_images/image-20200624220537395.png" src="_images/image-20200624220537395.png" />
<p class="caption"><span class="caption-number">Fig. 3 </span><span class="caption-text">image-20200624220537395</span><a class="headerlink" href="#id2" title="Permalink to this image">¶</a></p>
</div>
<p>当然,这与1/3不同。
我们认识到这是重复的小数,并且也许希望计算器知道正确的答案,但根本无法显示一连串永远持续下去的3。
但是,如果将其结果乘以3,通常看到下面的结果。很明显,计算器返回了错误的答案:</p>
<div class="figure align-default" id="id3">
<img alt="_images/image-20200624220650667.png" src="_images/image-20200624220650667.png" />
<p class="caption"><span class="caption-number">Fig. 4 </span><span class="caption-text">image-20200624220650667</span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p>
</div>
<p>有一些计算器返回的值看起来是1.0000000,但是如果您从中减去1结果,弹出窗口会显示<span class="math notranslate nohighlight">\(-1*10^{-10}\)</span>或<span class="math notranslate nohighlight">\(-1*10^{-23}\)</span>。
喔噢!</p>
<p>人们有时会说:“计算机不会说谎。”
实际上,他们一直在撒谎,并以令人难以置信的高速在撒谎。
在撰写本文时,世界上最快的计算机 系统自豪地每秒产生3千万万亿个(30
quintillion)谎言,就像上面的谎言一样:</p>
<p><strong>计算机无法存储正确答案,因此它们用其他接近的答案替代了.</strong></p>
<p>但是这足够接近正确答案了吗?
因为你必须仔细考虑一下,所以现有的计算机数学其实是无法“消除思考”。</p>
<p>为什么我们学会了忍受根本上像计算机一样逻辑的设备中的这种不严格的行为?
合理化是这样形成的的:</p>
<p>“计算机具有有限的存储空间,但是实数的数量是无限的,因此有时候您必须妥协一点。
如果我们使用高精度,那可能就足够了。 我们是这么<strong>希望</strong>的。”</p>
<p>短语“<strong>正确舍入</strong>”(“correctly rounded”)
是一个矛盾词,因为舍入后的数字根据定义就是用<em>不正确的数字</em>去替换<em>正确的数字</em>。
<strong>Macsyma</strong>,<strong>Mathematica</strong>®和<strong>Maple</strong>等符号数学程序提供了很好的解决方案,但有很高的计算成本。如果您有时间,上帝就是整数。<strong>区间算术</strong>(Interval
arithmetic)是一个诱人的方案,有望用严格的上下界范围进行计算,而不是用四舍五入的答案。但是当人们试图用它来解决物理学中的基本问题,虽然不会产生舍入误差,但是答案的界限比真实的结果宽松得多,并且过于宽松而没有意义了。为什么要采用一个花两倍的存储空间和两倍以上的算术工作的技术,而且答案需要比分析四舍五入的误差要更多专业知识来解释呢?</p>
<p>当美国同意在1990年代结束核试验时,开发和维护核武器的实验室认为它们可以用使用一项雄心勃勃的联邦计划-计算机模拟试验来替代:加速战略计算倡议(ASCI)。但是使用四舍五入的算术只是猜测和指导,而不能证明任何事情。已故诺贝尔奖获得者肯尼斯·威尔逊(Kenneth
Wilson)是第一次宣布了计算方法是科学的第三分支,是对实验和理论方法的补充。</p>
<div class="figure align-default" id="id4">
<img alt="_images/image-20200624225024670.png" src="_images/image-20200624225024670.png" />
<p class="caption"><span class="caption-number">Fig. 5 </span><span class="caption-text">image-20200624225024670</span><a class="headerlink" href="#id4" title="Permalink to this image">¶</a></p>
</div>
<p>ASCI计划试图在缺乏实验基础上取得坚实的科学结论,但是由于浮点计算缺乏数学上的严格性,关于核武器的仿真结果仍然是猜测。</p>
<p>虽然少数人关注可证明的有效答案,但很多人的人在乎计算机消耗多少电量以及多少内存来解决问题。电脑公司的高管曾说:没有人抱怨四舍五入的错误”,但是现在每个人都强烈地意识到了获得更好的<em>每瓦的计算性能</em>和<em>每美元的计算性能</em>需求。假设我们有一种严格的计算机算法形式,可以保证答案正确且可以让程序员自由使用更少的位来存储数字呢?到2000年代初,计算机内存速度和能耗越来越限制了它们的性能。技术应用的用户和程序员坚持将64位精度作为避免四舍五入错误的方法,但也许有一种方法可以使有界结果更准确,使用位数更少,且可证明。如果这还可以倚赖更少的数值专业知识,而不是更多来完成,那么程序员的生产率就可以同时提高。</p>
<p>公式,数字和计算机代码都使一本书难以阅读。
最密集的代码被归类到附录中以缓解这一问题,通常读者无需阅读代码部分即可了解后续内容。
这本书是 用Mathematica编写的.这可以确保数学和图形是正确无误的。
在一个示例中,四位“
unum”值获得正确答案,而用四精度(128位)浮点运算失败;
显示代码的主要原因是因为一些怀疑论者否则会认为这样的计算是不可能的,并会怀疑是一种障眼法。
这里给出了工作所需的完整严格的计算环境。</p>
<p>这里提出的新想法均未获得或是在申请专利,这是作者的本意。</p>
<p><em>unum方法提出的目的就是为了消除思考</em></p>
</div>
</div>
<div class="side-doc-outline">
<div class="side-doc-outline--content">
</div>
</div>
<div class="clearer"></div>
</div><div class="pagenation">
<a id="button-prev" href="index.html" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--colored" role="botton" accesskey="P">
<i class="pagenation-arrow-L fas fa-arrow-left fa-lg"></i>
<div class="pagenation-text">
<span class="pagenation-direction">Previous</span>
<div>THE END of ERROR - Unum Computing</div>
</div>
</a>
<a id="button-next" href="00_how_to_read.html" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--colored" role="botton" accesskey="N">
<i class="pagenation-arrow-R fas fa-arrow-right fa-lg"></i>
<div class="pagenation-text">
<span class="pagenation-direction">Next</span>
<div>如何读这本书</div>
</div>
</a>
</div>
</main>
</div>
</body>
</html>