role-algorithms:numerical-methods
Installation
SKILL.md
Numerical Methods
When to use
- Diagnosing floating-point precision issues (cancellation, accumulation error, overflow)
- Choosing between LU, QR, or SVD decomposition for a linear algebra problem
- Implementing root-finding when an analytical solution does not exist
- Selecting a numerical integration method based on smoothness and accuracy requirements
- Using FFT for polynomial multiplication, convolution, or signal analysis
- Reviewing cryptographic primitive usage for correctness and safety
Core principles
- Never compare floats with == — always use absolute or relative epsilon; this is not optional
- Partial pivoting is not optional in Gaussian elimination — skipping it breaks numerical stability
- SVD is the Swiss Army knife — when LU and QR fail or when rank matters, SVD solves it
- Brent's method is the default root finder — combines guaranteed convergence with superlinear speed
- Never implement your own crypto — use libsodium, OpenSSL, or Web Crypto API; rolling your own is a security incident waiting to happen