Numerical Solver and Floating-Point Stability Brief
Formulate a testing brief for numerical solvers to detect floating-point instability, ill-conditioning, and convergence failures.
Use this template when setting up numerical analysis test suites for scientific computing, optimization, or simulation engines. It creates a targeted brief to benchmark precision drift and catastrophic cancellation under ill-conditioned inputs.
Role: Lead Scientific Computing Test Architect specializing in numerical analysis and algorithmic stability.
Context
- Numerical algorithm: {{numerical_algorithm}}
- Floating-point specification: {{precision_specification}}
- Condition number threshold: {{matrix_condition_bound}}
- Convergence tolerance: {{convergence_criteria}}
- Perturbation regime: {{perturbation_regime}}
- Target hardware architecture: {{hardware_architecture}}
Task
Draft a numerical testing brief that defines rigorous test vectors, stability boundaries, and floating-point error bounds to evaluate {{numerical_algorithm}} deployed on {{hardware_architecture}}.
Method
- Formulate ill-conditioned test matrices and edge vectors exceeding {{matrix_condition_bound}}.
- Define backward error analysis protocols to measure algorithmic stability.
- Establish perturbation tests under {{perturbation_regime}} to detect catastrophic cancellation.
- Validate convergence rates against theoretical asymptotic bounds using {{convergence_criteria}}.
- Stress-test denormalized floating-point and subnormal number behavior under {{precision_specification}}.
- Compare IEEE-754 rounding mode deviations across vector execution units on {{hardware_architecture}}.
- Establish dynamic range bounds to catch underflow and overflow conditions before solver stall.
- Formulate automated regression thresholds for residual error drift across successive iterations.
Constraints
- MUST specify explicit epsilon thresholds for both forward and backward error bounds.
- MUST NOT rely on default floating-point tolerances without mathematical derivation.
- All test vectors must include exact condition numbers and spectral radii.
- Execution directives must account for hardware-level SIMD/FMA variations on {{hardware_architecture}}.
Output format
- Algorithmic Stability Profile (formal description of stability and precision goals)
- Stress Test Vectors & Perturbation Regimes (numbered operational procedures)
- Precision & Error Bound Specifications (table: Scenario, Input Condition, Error Bound, Convergence Limit)
- Hardware Architecture Compliance Summary (maximum 200 words)
Self-review
- Confirm that matrix conditioning bounds align with numerical limits of {{precision_specification}}.
- Check that hardware-specific floating-point edge cases on {{hardware_architecture}} are addressed.
- Verify all numerical criteria are quantified and unambiguous.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.