VERIFIED

NumPy is Wrong

The Hilbert matrix determinant is ALWAYS positive. NumPy returns negative values for n=14, 15, 16, and 20. This is mathematically impossible — it's a bug.

The Evidence

Mathematical Fact

The Hilbert matrix Hn has entries Hij = 1/(i+j-1). Its determinant is ALWAYS positive for any n. This is a proven mathematical theorem. NumPy violates this theorem.

Matrix SizeNumPy SignVLA SignMathematically Correct
n = 13++
n = 14-+
n = 15-+
n = 16-+
n = 17-19++
n = 20-+

4

NumPy wrong signs

0

VLA wrong signs

Why This Happens

The Hilbert Matrix is Notoriously Ill-Conditioned

The condition number grows exponentially with n. For n=15, the condition number exceeds 1017 — meaning FP64's 15-16 significant digits are completely consumed.

NumPy uses FP64 which has ~15 decimal digits. The Hilbert matrix at n=15 requires more precision than FP64 can provide. The result: mathematically impossible answers.

VLA's Advantage

VLA uses 512-bit integer arithmetic providing 77 decimal digits of precision. Even for n=20 Hilbert matrices (condition number ~1028), VLA has enough precision to compute exact results.

Implications

Control Systems

Hilbert matrices appear in polynomial fitting and control system design. Wrong signs can lead to unstable controllers.

Optimization

Many optimization algorithms involve ill-conditioned matrices. If your solver gives wrong answers on Hilbert matrices, it will give wrong answers elsewhere too.

Validation

The Hilbert matrix is a standard benchmark. If a library fails this benchmark, how can you trust it with your real problems?

Can Your Calculations Be Trusted?

Let us validate your numerical pipelines with exact arithmetic.

Request Discovery Call