Preface |
|
xiii | |
Acknowledgments |
|
xvii | |
How to read this book |
|
xix | |
Part 1 A New Number Format: The Unum |
|
|
|
1 | (6) |
|
1.1 Fewer bits. Better answers |
|
|
2 | (3) |
|
1.2 Why better arithmetic can save energy and power |
|
|
5 | (2) |
|
Chapter 2 Building up to the unum format |
|
|
7 | (18) |
|
2.1 A graphical view of bit strings: Value and closure plots |
|
|
8 | (2) |
|
|
10 | (4) |
|
|
14 | (3) |
|
2.4 Floating point format, almost |
|
|
17 | (5) |
|
2.5 What about infinity and NaN? Improving on IEEE rules |
|
|
22 | (3) |
|
Chapter 3 The "original sin" of computer arithmetic |
|
|
25 | (10) |
|
3.1 The acceptance of incorrect answers |
|
|
25 | (3) |
|
3.2 "Almost infinite" and "beyond infinity" |
|
|
28 | (2) |
|
3.3 No overflow, no undertow, and no rounding |
|
|
30 | (3) |
|
3.4 Visualizing ubit-enabled numbers |
|
|
33 | (2) |
|
Chapter 4 The complete unum format |
|
|
35 | (20) |
|
4.1 Overcoming the tyranny of fixed storage size |
|
|
35 | (1) |
|
4.2 The IEEE Standard float formats |
|
|
36 | (2) |
|
4.3 Unum format: Flexible range and precision |
|
|
38 | (2) |
|
4.4 How can appending extra bits save storage? |
|
|
40 | (1) |
|
4.5 Ludicrous precision? The vast range of unums |
|
|
41 | (1) |
|
4.6 Changing environment settings within a computing task |
|
|
42 | (1) |
|
4.7 The reference prototype |
|
|
43 | (4) |
|
4.8 Special values in a flexible precision environment |
|
|
47 | (1) |
|
4.9 Converting exact unums to real numbers |
|
|
48 | (2) |
|
4.10 A complete exact unum set for a small utag |
|
|
50 | (1) |
|
|
51 | (2) |
|
4.12 A visualizer for unum strings |
|
|
53 | (2) |
|
Chapter 5 Hidden scratchpads and the three layers |
|
|
55 | (30) |
|
5.1 The hidden scratchpad |
|
|
56 | (6) |
|
5.1.1 The Cray-1 supercomputer |
|
|
57 | (1) |
|
5.1.2 The original definition of the C language |
|
|
58 | (1) |
|
5.1.3 Coprocessors also try to be helpful |
|
|
59 | (1) |
|
5.1.4 IBM almost gets it right: The fused multiply-add |
|
|
60 | (1) |
|
5.1.5 Kulisch gets it right: The exact dot product (EDP) |
|
|
61 | (1) |
|
|
62 | (3) |
|
|
62 | (2) |
|
5.2.2 Processor design for the u-layer |
|
|
64 | (1) |
|
|
65 | (9) |
|
5.3.1 The general bound, or "gbound" |
|
|
65 | (2) |
|
5.3.2 Who uses NaN? Sun Microsystems gets a nasty surprise |
|
|
67 | (1) |
|
5.3.3 An explosion of storage demand in the scratchpad? |
|
|
68 | (1) |
|
5.3.4 Traditional interval arithmetic. Watch out. |
|
|
69 | (3) |
|
5.3.5 Significance arithmetic |
|
|
72 | (1) |
|
5.3.6 Why endpoints must be marked open or closed |
|
|
72 | (2) |
|
|
74 | (4) |
|
5.4.1 Numbers as people perceive them |
|
|
74 | (1) |
|
5.4.2 Demands and concessions |
|
|
75 | (3) |
|
5.5 Moving between layers |
|
|
78 | (4) |
|
5.5.1 Defining the conversion function |
|
|
78 | (3) |
|
5.5.2 Testing the conversion function |
|
|
81 | (1) |
|
5.6 Summary of conversions between layers in the prototype |
|
|
82 | (1) |
|
5.7 Are floats "good enough for government work"? |
|
|
83 | (2) |
|
Chapter 6 Information per bit |
|
|
85 | (8) |
|
6.1 Information as the reciprocal of uncertainty |
|
|
85 | (1) |
|
6.2 "Unifying" a bound to a single ULP |
|
|
86 | (1) |
|
6.3 Unification in the prototype |
|
|
87 | (4) |
|
6.3.1 The option of lossy compression |
|
|
87 | (1) |
|
6.3.2 Intelligent unification |
|
|
88 | (2) |
|
6.3.3 Much ado about almost nothing and almost infinite |
|
|
90 | (1) |
|
6.4 Can ubounds save storage compared with traditional floats? |
|
|
91 | (2) |
|
Chapter 7 Fixed-size unum storage |
|
|
93 | (10) |
|
|
93 | (2) |
|
|
95 | (3) |
|
7.3 Hardware for unums: Faster than float hardware? |
|
|
98 | (5) |
|
7.3.1 General comments about the cost of handling exceptions |
|
|
98 | (1) |
|
7.3.2 Unpacked unum format and the "summary bits" idea |
|
|
99 | (4) |
|
Chapter 8 Comparison operations |
|
|
103 | (8) |
|
8.1 Less than, greater than |
|
|
103 | (3) |
|
8.1.1 Conceptual definition of ordering for general intervals |
|
|
103 | (2) |
|
8.1.2 Hardware design for "less than" and "greater than" tests |
|
|
105 | (1) |
|
8.2 Equal, nowhere equal, and "not nowhere equal" |
|
|
106 | (3) |
|
8.2.1 Conceptual definition of "equal" for general intervals |
|
|
106 | (3) |
|
8.2.2 Hardware approach for equal and "not nowhere equal" |
|
|
109 | (1) |
|
|
109 | (2) |
|
Chapter 9 Add/subtract, and the unbiased rounding myth |
|
|
111 | (16) |
|
9.1 Re-learning the addition table... for all real numbers |
|
|
111 | (6) |
|
9.1.1 Examples and tests of data motion |
|
|
114 | (1) |
|
9.1.2 Three-dimensional visualization of ubound addition |
|
|
115 | (1) |
|
9.1.3 Hardware design for unum addition and subtraction |
|
|
116 | (1) |
|
9.2 "Creeping crud" and the myth of unbiased rounding |
|
|
117 | (4) |
|
9.3 Automatic accuracy control and a simple unum math test |
|
|
121 | (6) |
|
Chapter 10 Multiplication and division |
|
|
127 | (14) |
|
10.1 Multiplication requires examining each quadrant |
|
|
128 | (4) |
|
10.2 Hardware for unum multiplication |
|
|
132 | (4) |
|
10.2.1 Multiplies that fit the standard hardware approach |
|
|
132 | (3) |
|
10.2.2 Extended precision and the "complete accumulator" |
|
|
135 | (1) |
|
10.2.3 Really big multiplies |
|
|
135 | (1) |
|
10.3 Division introduces asymmetry in the arguments |
|
|
136 | (5) |
|
10.3.1 The "bad boy" of arithmetic |
|
|
136 | (3) |
|
10.3.2 Hardware for unum division |
|
|
139 | (2) |
|
|
141 | (14) |
|
|
141 | (2) |
|
|
143 | (2) |
|
11.3 Nested square roots and "ULP straddling" |
|
|
145 | (1) |
|
11.4 Taxing the scratchpad: Integers to integer powers |
|
|
146 | (1) |
|
11.5 A practice calculation of xy at low precision |
|
|
147 | (2) |
|
11.6 Practical considerations and the actual working routine |
|
|
149 | (3) |
|
11.6.1 Why the power function can be fast |
|
|
149 | (1) |
|
11.6.2 The prototype power function |
|
|
150 | (1) |
|
11.6.3 A challenge to the defenders of floats |
|
|
151 | (1) |
|
11.7 Exp(x) and "The Table-Maker's Dilemma" |
|
|
152 | (3) |
|
11.7.1 Another dilemma caused by the dishonesty of rounding |
|
|
152 | (1) |
|
11.7.2 The prototype exponential function |
|
|
153 | (2) |
|
Chapter 12 Other important unary operations |
|
|
155 | (4) |
|
12.1 Scope of the prototype |
|
|
155 | (1) |
|
|
155 | (1) |
|
12.3 Natural logarithm, and a mention of log base 2 |
|
|
156 | (1) |
|
12.4 Trig functions: Ending the madness by degrees |
|
|
156 | (3) |
|
Chapter 13 Fused operations (single-use expressions) |
|
|
159 | (14) |
|
13.1 Standardizing a set of fused operations |
|
|
159 | (1) |
|
13.2 Fused multiply-add and fused multiply-subtract |
|
|
160 | (1) |
|
13.3 Solving the paradox of slow arithmetic for complex numbers |
|
|
161 | (1) |
|
13.4 Unum hardware for the complete accumulator |
|
|
162 | (5) |
|
13.4.1 Cost within the unpacked unum environment |
|
|
162 | (2) |
|
13.4.2 Fused dot product and fused sums in the prototype |
|
|
164 | (1) |
|
13.4.3 Consistent results for parallel computing |
|
|
165 | (2) |
|
13.5 Other fused operations |
|
|
167 | (6) |
|
13.5.1 Not every pairing of operations should be fused |
|
|
167 | (1) |
|
|
167 | (2) |
|
13.5.3 Fused add-multiply |
|
|
169 | (1) |
|
13.5.4 Fused product ratio |
|
|
169 | (2) |
|
13.5.5 Fused norm, fused root dot product, and fused mean |
|
|
171 | (2) |
|
Chapter 14 Trial runs: Unums face challenge calculations |
|
|
173 | (20) |
|
14.1 Floating point II: The wrath of Kahan |
|
|
173 | (6) |
|
|
179 | (2) |
|
14.3 The quadratic formula |
|
|
181 | (3) |
|
14.4 Bailey's numerical nightmare |
|
|
184 | (4) |
|
14.5 Fast Fourier Transforms using unums |
|
|
188 | (5) |
|
|
193 | (2) |
Part 2 A New Way to Solve: The Ubox |
|
|
Chapter 15 The other kind of error |
|
|
195 | (20) |
|
|
195 | (2) |
|
15.2 The deeply unsatisfying nature of classical error bounds |
|
|
197 | (2) |
|
|
199 | (2) |
|
|
201 | (2) |
|
15.5 A ubox connected-region example: Computing the unit circle area |
|
|
203 | (7) |
|
15.6 A definition of answer quality and computing "speed" |
|
|
210 | (2) |
|
15.7 Another Kahan booby trap: The "smooth surprise" |
|
|
212 | (3) |
|
Chapter 16 Avoiding interval arithmetic pitfalls |
|
|
215 | (18) |
|
16.1 Useless error bounds |
|
|
215 | (1) |
|
16.2 The wrapping problem |
|
|
215 | (4) |
|
16.3 The dependency problem |
|
|
219 | (2) |
|
16.4 Intelligent standard library routines |
|
|
221 | (1) |
|
16.5 Polynomial evaluation without the dependency problem |
|
|
222 | (9) |
|
16.6 Other fused multiple-use expressions |
|
|
231 | (2) |
|
Chapter 17 What does it mean to "solve" an equation? |
|
|
233 | (24) |
|
17.1 Another break from traditional numerical methods |
|
|
233 | (1) |
|
17.2 A linear equation in one unknown, solved by inversion |
|
|
234 | (7) |
|
17.2.1 Inversion with unums and intervals |
|
|
236 | (1) |
|
17.2.2 Ubounds as coefficients |
|
|
237 | (4) |
|
17.3 "Try everything!" Exhaustive search of the number line |
|
|
241 | (4) |
|
17.3.1 The quadratic formula revisited |
|
|
241 | (1) |
|
17.3.2 To boldly split infinities: Try everything |
|
|
242 | (3) |
|
17.3.3 Highly adjustable parallelism |
|
|
245 | (1) |
|
17.4 The universal equation solver |
|
|
245 | (6) |
|
17.4.1 Methods that USUALLY work |
|
|
245 | (2) |
|
17.4.2 The general failure of the inversion method |
|
|
247 | (3) |
|
17.4.3 Inequality testing; finding extrema |
|
|
250 | (1) |
|
17.4.4 The "intractable" fallacy |
|
|
251 | (1) |
|
17.5 Solvers in more than one dimension |
|
|
251 | (5) |
|
17.6 Summary of the ubox solver approach |
|
|
256 | (1) |
|
Chapter 18 Permission to guess |
|
|
257 | (16) |
|
18.1 Algorithms that work for floats also work for unums |
|
|
257 | (4) |
|
18.2 A fixed-point problem |
|
|
261 | (9) |
|
18.3 Large systems of linear equations |
|
|
270 | (2) |
|
|
272 | (1) |
|
Chapter 19 Pendulums done correctly |
|
|
273 | (14) |
|
19.1 The introductory physics approach |
|
|
273 | (1) |
|
19.2 The usual numerical approach |
|
|
274 | (2) |
|
19.3 Space stepping: A new source of massive parallelism |
|
|
276 | (6) |
|
19.4 It's not just for pendulums |
|
|
282 | (5) |
|
Chapter 20 The two-body problem (and beyond) |
|
|
287 | (24) |
|
20.1 A differential equation with multiple dimensions |
|
|
287 | (7) |
|
20.1.1 Setting up a traditional simulation |
|
|
288 | (4) |
|
20.1.2 Trying a traditional method out on a single orbit |
|
|
292 | (2) |
|
20.1.3 What about interval arithmetic methods? |
|
|
294 | (1) |
|
20.2 Ubox approach: The initial space step |
|
|
294 | (8) |
|
20.2.1 Solving the chicken-and-egg puzzle |
|
|
294 | (2) |
|
20.2.2 First, bound the position |
|
|
296 | (6) |
|
20.3 The next starting point, and some state law enforcement |
|
|
302 | (3) |
|
20.4 The general space step |
|
|
305 | (3) |
|
20.5 The three-body problem |
|
|
308 | (2) |
|
20.6 The n-body problem and the galaxy colliders |
|
|
310 | (1) |
|
Chapter 21 Calculus considered evil: Discrete physics |
|
|
311 | (16) |
|
21.1 Continuum versus discrete physics |
|
|
311 | (2) |
|
21.2 The discrete version of a vibrating string |
|
|
313 | (3) |
|
|
316 | (5) |
|
|
321 | (6) |
|
Chapter 22 The end of error |
|
|
327 | (6) |
Glossary |
|
333 | (4) |
Appendix A: Glossary of unum functions |
|
337 | (6) |
|
A.1 Environment and bit-extraction functions |
|
|
337 | (1) |
|
|
337 | (1) |
|
A.3 Visualization functions |
|
|
337 | (1) |
|
|
338 | (1) |
|
A.5 Argument validity tests |
|
|
338 | (1) |
|
A.6 Helper functions for functions defined above |
|
|
338 | (1) |
|
A.7 Comparison operations |
|
|
339 | (1) |
|
A.8 Arithmetic operations |
|
|
339 | (1) |
|
A.9 Fused operations (single-use expressions) |
|
|
340 | (1) |
|
A.10 Some defined data values |
|
|
341 | (1) |
|
A.11 Auto-precision functions |
|
|
342 | (1) |
Appendix B: Glossary of ubox functions |
|
343 | (4) |
|
B.1 ULP-related manipulations |
|
|
343 | (1) |
|
B.2 Neighbor-finding functions |
|
|
343 | (1) |
|
B.3 Ubox creation by splitting |
|
|
343 | (1) |
|
|
344 | (1) |
|
B.5 Ubox bounds, width, volume |
|
|
344 | (1) |
|
B.6 Test operations on sets |
|
|
344 | (1) |
|
B.7 Fused polynomial evaluation and acceleration formula |
|
|
345 | (1) |
|
B.8 The try-everything solver |
|
|
345 | (1) |
|
B.9 The guessing function |
|
|
345 | (2) |
Appendix C: Algorithm listings for Part 1 |
|
347 | (36) |
|
C.1 The set-the-environment function |
|
|
348 | (1) |
|
C.2 Type-checking functions |
|
|
349 | (2) |
|
C.3 The unum-to-float converter and supporting functions |
|
|
351 | (1) |
|
C.4 The u-layer to general interval conversions |
|
|
352 | (1) |
|
C.5 The real-to-unum or x conversion function |
|
|
353 | (3) |
|
C.6 Unification functions and supporting functions |
|
|
356 | (2) |
|
C.7 The general interval to unum converter |
|
|
358 | (1) |
|
C.8 Comparison tests and ubound intersection |
|
|
359 | (3) |
|
C.9 Addition and subtraction functions |
|
|
362 | (1) |
|
C.10 Multiplication functions |
|
|
363 | (2) |
|
|
365 | (2) |
|
C.12 Automatic precision adjustment functions |
|
|
367 | (1) |
|
C.13 Fused operations (single-use expressions) |
|
|
367 | (5) |
|
C.14 Square and square root |
|
|
372 | (1) |
|
C.15 The power function xy and exp(x) |
|
|
373 | (5) |
|
C.16 Absolute value, logarithm, and trigonometry functions |
|
|
378 | (4) |
|
C.17 The unum Fast Fourier Transform |
|
|
382 | (1) |
Appendix D: Algorithm listings for Part 2 |
|
383 | (18) |
|
D.1 ULP manipulation functions |
|
|
383 | (2) |
|
D.2 Neighbor-finding functions |
|
|
385 | (2) |
|
D.3 Ubox creation by splitting |
|
|
387 | (2) |
|
|
389 | (3) |
|
D.5 Ubox bounds, width, volumes |
|
|
392 | (1) |
|
D.6 Test operations on sets |
|
|
393 | (1) |
|
D.7 Fused polynomial evaluation and acceleration formula |
|
|
394 | (4) |
|
D.8 The try-everything solver |
|
|
398 | (1) |
|
|
399 | (2) |
For Further Reading |
|
401 | (2) |
Index |
|
403 | |