Cheatsheet 2
Floating Point Numbers
- Normalized Form: where ,
- Parameters: where = base, = mantissa, & = exponent bounds
- IEEE Standards:
- Single Precision (32 bits):
- Double Precision (64 bits):
- Errors:
- Absolute Error:
- Relative Error:
- significant digits if
- Machine Epsilon (): Smallest value where
- Rounding:
- Truncation:
- Arithmetic Operations: where
- Cancellation Errors: Occur when subtracting similar magnitude numbers
Interpolation & Splines
- Interpolation: Given points , estimate where
- Unique Polynomial: Degree for distinct points
- Monomial Form:
- Lagrange Form: where
- Cubic Splines: Piecewise cubic polynomials with C² continuity
- unknowns, equations + 2 boundary conditions
- Boundary Conditions: Clamped (, specified), Natural (), Periodic, Not-a-knot ()
- Parametric Curves: for more general curves
Ordinary Differential Equations
- First-Order ODE: ,
- Time-Stepping Methods:
- Forward Euler (explicit):
- LTE: , conditionally stable if
- Backward Euler (implicit):
- LTE: , unconditionally stable
- Trapezoidal Rule (implicit):
- Improved Euler (explicit):
- LTE: , conditionally stable if
- RK4 (explicit):
- LTE:
- Local vs Global Error:
- Local Truncation Error (LTE): Error in one step
- Global Error ≈ Local Error × Number of steps = where is LTE order
- Adaptive Time-Stepping:
- Run two methods of different orders
- Estimate error:
- Adjust step size: