Validated Numerics: A Short Introduction to Rigorous Computations
()
About this ebook
A comprehensive, self-contained primer on validated numerics
This textbook provides a comprehensive introduction to the theory and practice of validated numerics, an emerging new field that combines the strengths of scientific computing and pure mathematics. In numerous fields ranging from pharmaceutics and engineering to weather prediction and robotics, fast and precise computations are essential. Based on the theory of set-valued analysis, a new suite of numerical methods is developed, producing efficient and reliable solvers for numerous problems in nonlinear analysis. Validated numerics yields rigorous computations that can find all possible solutions to a problem while taking into account all possible sources of error—fast, and with guaranteed accuracy.
Validated Numerics offers a self-contained primer on the subject, guiding readers from the basics to more advanced concepts and techniques. This book is an essential resource for those entering this fast-developing field, and it is also the ideal textbook for graduate students and advanced undergraduates needing an accessible introduction to the subject. Validated Numerics features many examples, exercises, and computer labs using MATLAB/C++, as well as detailed appendixes and an extensive bibliography for further reading.
- Provides a comprehensive, self-contained introduction to validated numerics
- Requires no advanced mathematics or programming skills
- Features many examples, exercises, and computer labs
- Includes code snippets that illustrate implementation
- Suitable as a textbook for graduate students and advanced undergraduates
Related to Validated Numerics
Related ebooks
Emerging Social Computing Techniques: Volume 3 Rating: 0 out of 5 stars0 ratingsNumerical Methods for Scientists and Engineers Rating: 4 out of 5 stars4/5Cloud Computing for Engineering Applications Rating: 0 out of 5 stars0 ratingsMétodos numéricos aplicados a Ingeniería: Casos de estudio usando MATLAB Rating: 5 out of 5 stars5/5Spatial Econometrics using Microdata Rating: 0 out of 5 stars0 ratingsComputer-Controlled Systems: Theory and Design, Third Edition Rating: 3 out of 5 stars3/5Linear Programming: Foundations and Extensions Rating: 0 out of 5 stars0 ratingsBasic Modelling and Design Rating: 0 out of 5 stars0 ratingsQuantum Computing: An Introduction to the Science and Technology of the Future Rating: 0 out of 5 stars0 ratingsComputer Assisted Proof: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsQuantum Computing for Programmers and Investors: with full implementation of algorithms in C Rating: 5 out of 5 stars5/5Fundamentals of Data Warehouses Rating: 4 out of 5 stars4/5Handbook of Electronics Formulas and Calculations - Volume 2 Rating: 0 out of 5 stars0 ratingsCognitive Radio Communication and Networking: Principles and Practice Rating: 0 out of 5 stars0 ratingsAutomated Theorem Proving: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsEconometrics and Data Science: Apply Data Science Techniques to Model Complex Problems and Implement Solutions for Economic Problems Rating: 0 out of 5 stars0 ratingsIntroduction to Quantum Computing & Machine Learning Technologies: 1, #1 Rating: 0 out of 5 stars0 ratingsQuantum Software Development for Beginners Rating: 0 out of 5 stars0 ratingsAn Introduction to Statistical Computing: A Simulation-based Approach Rating: 0 out of 5 stars0 ratingsBeginning Mathematica and Wolfram for Data Science: Applications in Data Analysis, Machine Learning, and Neural Networks Rating: 0 out of 5 stars0 ratingsHandbook of Electronics Formulas and Calculations - Volume 1 Rating: 5 out of 5 stars5/5Automated Theorem Proving in Software Engineering Rating: 0 out of 5 stars0 ratingsUsing Artificial Neural Networks for Analog Integrated Circuit Design Automation Rating: 0 out of 5 stars0 ratingsComputational Statistics Rating: 5 out of 5 stars5/5The Hidden Power: Quantum Computing Rating: 0 out of 5 stars0 ratingsPerspectives in Computation Rating: 5 out of 5 stars5/5Spatio-temporal Design: Advances in Efficient Data Acquisition Rating: 0 out of 5 stars0 ratingsIntroduction to Statistics in Metrology Rating: 0 out of 5 stars0 ratingsVirtual Report Processing: The Mapper Story Rating: 0 out of 5 stars0 ratings
Computers For You
The Invisible Rainbow: A History of Electricity and Life Rating: 5 out of 5 stars5/5The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution Rating: 4 out of 5 stars4/5Elon Musk Rating: 4 out of 5 stars4/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsUncanny Valley: A Memoir Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsRemote/WebCam Notarization : Basic Understanding Rating: 3 out of 5 stars3/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5CompTIA Security+ Get Certified Get Ahead: SY0-701 Study Guide Rating: 5 out of 5 stars5/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5Make Your PC Stable and Fast: What Microsoft Forgot to Tell You Rating: 4 out of 5 stars4/5People Skills for Analytical Thinkers Rating: 5 out of 5 stars5/5
Reviews for Validated Numerics
0 ratings0 reviews
Book preview
Validated Numerics - Warwick Tucker
Numerics
Chapter One
Computer Arithmetic
In This Chapter, we give an elementary overview of how (and what type of) numbers are represented, stored, and manipulated in a computer. This will provide insight as to why some computations produce grossly incorrect results. This topic is covered much more extensively in, for example, [Mu09], [Hi96], [Ov01], and [Wi63].
1.1 POSITIONAL SYSTEMS
Our everyday decimal number system is a positional system in base 10. Since computer arithmetic is often built on positional systems in other bases (e.g., 2 or 16), 1 we will begin this section by recalling how real numbers are represented in a positional system with an arbitrary integer base β ≥ 2. Setting aside practical restrictions, such as the finite storage capabilities of a computer, any real number can be expressed as an infinite string
where bn, bn–1, ... are integers in the range [0, β – 1], and σ {0, 1} provides the sign of the number. The real number corresponding to (1.1) is
If the number ends in an infinite number of consecutive zeros we omit them in the expression (1.1). Thus we write (12.25)10 instead of (12.25000…)10. Also, we omit any zeros preceding the integer part (–1) σ (bnbn–1…b0)β. Thus we write (12.25)10 instead of (0012.25)10, and (0.0025)10 instead of (000.0025)10. Allowing for either leading or trailing extra zeros is called padding and is not common practice since it leads to redundancies in the representation.
Even without padding, the positional system is slightly flawed. No matter what base we choose, there are still real numbers that do not have a unique representation. For example, the decimal number (12.2549999 …)10 is equal to (12.255)10, and the binary number (100.01101111 …)2 is equal to (100.0111)2. This redundancy, however, can be avoided if we add the requirement that 0 ≤ bi ≤ β – 2 for infinitely many i.
Exercise 1.1. Prove that any real number x ≠ 0 has a unique representation (1.1) in a positional system (allowing no padding) with integer base β ≥ 2 under the two conditions (a) 0 ≤ bi ≤ β – 1 for all i, and (b) 0 ≤ bi ≤ β – 2 for infinitely many i.
Exercise 1.2. What is the correct way to represent zero in a positional system allowing no padding?
1.2 FLOATING POINT NUMBERS
When expressing a real number on the form (1.1), the placement of the decimal 2 point is crucial. The floating point number system provides a more convenient way to represent real numbers. A floating point number is a real number on the form
where(–1) σ is the sign of x, m is called the mantissa, 3 and e is called the exponent of x. Writing numbers in floating point notation frees us from the burden of keeping track of the decimal point: it always follows the first digit of the mantissa. It is customary to write the mantissa as
where, compared to the previous section, the indexing of the bi has the opposite sign. As this is the standard notation, we will adopt this practice in what follows. Thus we may define the set of floating point numbers in base β as:
where, as before, we request that β is an integer no less than 2, and that 0 ≤ bi ≤ β – 1 for all i, and that 0 ≤ bi ≤ β – 2 for infinitely many i. The exponent e may be any integer.
Expressing real numbers in floating point form introduces a new type of redundancy. For example, the base 10 number 123 can be expressed as (1.23)10 × 10 2, (0.123)10 × 10 3, (0.0123)10 × 10 4, and so on. In order to have unique representations for non-zero real numbers, we demand that the leading digit b0 be non-zero, except for the special case x = 0. Floating point numbers satisfying this additional requirement are said to be normal or normalized. 4
Exercise 1.3. Show that a non-zero floating point number is normal if and only if its associated exponent e is chosen minimal.
. As this set is uncountably infinite, whereas a machine can only store a finite amount of information, more drastic means are called for: we must introduce a new, much smaller set of numbers designed to fit into a computer that at the same time approximate the real numbers in some well-defined sense.
As a first step toward this goal, we restrict the number of digits representing the mantissa. This yields the set
The number p is called the precision is too large for our needs. Note, however, that the restriction 0 ≤ bi ≤ – 2 for infinitely many i becomes void in finite precision.
A finite set of floating point numbers can be formed by imposing a fixed precision, as well as bounds on the admissible exponents. Such a set is specified by four integers: the base β, the precision p, and ê, respectively. Given these quantities, we can define parameterized sets of computer representable floating point numbers:
Exercise 1.4. Show that is finite, whereas is uncountably infinite, with
(See appendix A for the different notions of infinite.)
Exercise 1.5. How many normal numbers belong to the set ?
Using a base other than 10 forces us to have to rethink which numbers have a finite representation. This can cause some confusion to the novice programmer.
Example 1.2.1 With β = 2 and p < ∞, the number 1/10 is not exactly representable in This can be seen by noting that
Interpreting the first sum as a binary representation, we have
Since this is a non-terminating binary number, it has no exact representation in 2,p, regardless of the choice of precision p.
This example may come as a surprise to all who use the popular step-sizes 0.1 or 0.001 in, say, numerical integration methods. Most computers use β = 2 in their internal floating point representation, which means that on these computers 1000 × 0.001 ≠ 1. This simple fact can have devastating consequences, for example, for very long integration procedures. More suitable step-sizes would be 2 —3 = 0.125 and 2 —10 = 0.0009765625, which are exactly representable in base 2. Example 1.4.1 further illustrates how sensitive numerical computations can be to these small conversion errors.
1.2.1 Subnormal Numbers
As mentioned earlier, without the normalizing restriction b. (Note, however, that most real numbers no longer have any representation in this finite set.) We already remarked that these redundancies may be avoided by normalization, that is, by demanding that all non-zero floating point numbers have a non-zero leading digit. To illustrate the concept of normalized numbers, we will study a small toy system of floating point numbers, illustrated in Figure 1.1.
.
It is clear that the floating point numbers are not uniformly distributed: the positive numbers are given by
Thus the intermediate distances between consecutive numbers range within the set {0.125, 0.25, 0.5, 1}. In Section 1.3, we will explain why this type of non-uniform spacing is a good idea. We will also describe how to deal with real numbers having modulus greater than the largest positive normal number , which in our toy system is (1.11)2 × 2 2 = 7.
Note that the smallest positive normal number = (1.00)2 × 2 –1 = 0.5, which leaves an undesired gap centered around the origin. This leads not only to a huge loss of accuracy when approximating numbers of small magnitude but also to the violation of some of our most valued mathematical laws (see Exercise 1.18). A way to work around these problems is to allow for some numbers that are not normal.
with bis said to be subnormal (or denormalized). Subnormal numbers allow for a gradual underflow to zero (compare Figures 1.1 and 1.2). Extending the set of admissible floating point numbers to include the subnormal numbers still preserves uniqueness of representation, although the use of these additional numbers comes with some penalties, as we shall shortly see. For our toy system at hand, the positive subnormal numbers are {0.125, 0.25, 0.375}.
. The difference between these two sets is striking: the smallest positive normal number is (1.00)2 x 2 –1 = 0.5, whereas the smallest positive subnormal number is (0.01)2 x 2 –1 = 0.125. The largest subnormal number N smax is (0.11)2 x 2 –1 = 0.375. Geometrically, introducing subnormal numbers corresponds to filling the gap centered around the origin with evenly spaced numbers. The spacing should be the same as that between the two smallest positive normal numbers.
, we mean the set of normal and β,p when needed, the exact parameters of the set in question will be provided. A real number x with N nmin ≤ |x| ≤ N nmax is said to be in the normalized range of the associated floating point system.
Exercise 1.6. Prove that the non-zero normal and subnormal numbers of have unique representations.
Exercise 1.7. How many positive subnormal numbers are there in the set ?
Exercise 1.8. Derive formulas for for a general set of floating point numbers .
≤ m, n ≤ < ∩ [β n, β n+1∩ [β n, β n+1) have the same cardinality. This is apparent in is symmetric with respect to the origin: x ⇔ -x .
Exercise 1.9.Compute the number of elements of the set .
1.3 ROUNDING
, we must find a means to associate any real number x to a member y . Such an association is called rounding . Obviously, we cannot make the map invertible, but we would like to make it as close as possible to a homeomorphism.
. In the actual implementation, the symbols {–∞ +∞} are specially coded and do not have a valid representation such as (1.2).
Following the excellent treatise on computer arithmetic,