Numerical Computing Foundations
-
Absolute and Relative Error by Example
Absolute error measures the size of a difference in the original unit. Relative error compares that difference to the magnitude of a nonzero reference.
-
Precision and Accuracy in Numerical Results
Precision describes the resolution or consistency of numerical information. Accuracy describes agreement with the reference or true quantity under a stated measure.
-
Rounding an Intermediate or Final Result
Rounding before combining values can change the result. The correct stage depends on the intended numerical or domain contract.
-
Floating-Point Spacing Changes with Magnitude
A binary floating-point format has bounded significant precision. The distance between representable numbers changes across exponent ranges.
-
Rewriting a Difference of Nearly Equal Squares
Equivalent algebraic formulas can use different rounding paths. Factoring can avoid subtracting separately rounded large intermediate terms.
-
Avoiding Intermediate Overflow in a Euclidean Norm
A square-and-sum formula can overflow before taking a square root even when the actual norm fits.
-
Accumulating Small Terms Before Large Terms
Adding a very small term to a much larger accumulated result can round away the smaller contribution.
-
A Sign Change and a Bracketed Root
Continuity and opposite endpoint signs guarantee at least one zero in the interval. They give a useful invariant for halving it.
-
Choosing a Bisection Iteration Budget
Bisection reduces a bracket width by a factor of two each time under the exact arithmetic model.
-
One Newton Step for a Square Root
Newton's method uses the tangent approximation to a differentiable function to choose its next root estimate.
-
Root Residual and Error in the Input
A small residual means the function is close to its target value. How accurately that locates the input depends on the function's sensitivity.
-
Fixed-Point Iteration as Repeated Substitution
Find a value left unchanged by a function and trace how repeated evaluation can approach it.
-
Linear Interpolation Between Known Values
Linear interpolation weights two endpoint values according to a position within their interval.
-
Interpolation and Fitting with Noisy Observations
An interpolant reproduces selected data values exactly. A fitted model can leave residuals while representing a simpler relationship.
-
Estimating a Derivative with a Forward Difference
A forward difference divides the change in a function over a step by the step length.
-
A Central Difference Uses Both Sides
A centered difference estimates a derivative from values sampled at equal distances on either side of a point.
-
Approximating an Integral with Rectangles
A rectangle rule multiplies a sampled function value by interval width and sums the contributions over subintervals.
-
A Trapezoidal Integral Approximation
The trapezoidal rule uses the average of the two boundary values times interval width on each piece.
-
An Euler Step for a Differential Equation
Explicit Euler approximates the next value by adding the current slope times a chosen step.
-
Computing a Linear System Residual
A linear system residual measures the difference between the required right-hand side and the one produced by a proposed solution.
-
A Matrix–Vector Product by Row Dot Products
Each output component of a matrix–vector product combines one input row with the vector through matching positions.
-
Dot Products and Orthogonality
The dot product multiplies matching components and sums them. For nonzero real vectors, it relates to the cosine of the angle between them.
-
Two Distances Between Numeric Vectors
Different norms summarize coordinate differences in different ways. Choose the one matching what the error or distance is meant to measure.
-
Normalizing a Nonzero Vector
Dividing a vector by its positive norm gives unit length under that norm while keeping its direction.
-
Eliminating One Variable from a Two-Equation System
Elimination combines equations to remove terms while preserving the solution set under suitable operations.
-
Recognizing Dependent Columns in a Data Matrix
One column can be determined by others. Such dependence can leave several coefficient vectors producing the same predictions.
-
A Least-Squares Line Through the Origin
A scalar slope through the origin can be selected to minimize the sum of squared vertical residuals.
-
Checking a Numerical Routine Across Scales
A numerical test can vary magnitude and structure separately so it reveals both model errors and representation limits.
-
Testing a Calculation Under a Change of Units
A change of units can supply an independent relation that a correctly implemented numerical routine should preserve.
-
Reporting an Approximation with Its Error Criterion
A useful numerical result describes the estimate, the stopping rule, and what evidence supports its stated accuracy.