OpenBLAS/lapack/laed3
hheei 71f2260186 lapack/laed3: guard sqrt(-w[i]) against spuriously positive w[i]
When eigenvalues are nearly degenerate, numerical accumulation in
the divide-and-conquer merge can push w[i] slightly above zero.
The subsequent sqrt(-w[i]) then produces NaN, which propagates
through the entire eigenvector output of DSYEVD/DSTEDC.

Use fmax(-w[i], 0.0) to safely clamp the sqrt argument, yielding
zero instead of NaN for spuriously positive w[i].  The fmax call
maps to a single vmaxsd instruction on x86_64 with zero overhead.

Add test/test_laed3_nan.c which exercises DSYEVD on a rank-1
perturbed identity matrix designed to create near-degenerate
eigenvalue clusters.
2026-07-02 23:03:38 +08:00
..
Makefile fix conditional build for double and complex too 2026-02-18 19:10:53 +01:00
laed3_parallel.c lapack/laed3: guard sqrt(-w[i]) against spuriously positive w[i] 2026-07-02 23:03:38 +08:00
laed3_single.c lapack/laed3: guard sqrt(-w[i]) against spuriously positive w[i] 2026-07-02 23:03:38 +08:00