eig2

std.linalg.eig2 · Level L2

The eigenvalues of a real 2×2 matrix, symmetric or not: the roots of λ² − tr(M)·λ + det(M) = 0, through quadratic_roots. A complex pair is λ ± i·imag, and imag = 0 for real eigenvalues.

λ² − tr(M)λ + det(M) = 0

Signature

eig2(M: f64[2, 2]) → f64[], f64[], f64[]

Structure

The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.

Mf64[2, 2]1.0Slicer0Slicer1Reshapea1Slicem00Slicem11Slicem01Slicem10AddtrMultiplypMultiplyqNegatentrSubtractdtReshapeb1Reshapec1quadratic_rootsx1ReduceSumlam1ReduceSumlam2ReduceSumimaglam1f64[]lam2f64[]imagf64[]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference roots of λ² − tr·λ + det, in quadratic_roots' order to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 120 float64 results inside the running error bound; the closest uses 31% of it.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them inside the running error bound at u = 2⁻²⁴; the closest uses 24% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
86%
bit-equal to the NumPy formula in float64
82%
largest error, in units in the last place
5.64

Identity

Calls
Called by
—
sha256:5544ccff3e54595455732846b1ffd5fa20770e891d28921cb38010998bcd7997

The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.

Control handle

Symbol
Ω:std.linalg.eig2 · Ω:eig2
Pins
sha256:29ab9a79ea1a0aeeeb83d4b3e16d537cf8792c574802822f418af756febadf2fthis graph and the 1 it reaches through calls
Evidence
sha256:87e6da9d5851ecdba08e546d268e3aeba1ea6a8bd4771ce8a6b72166b09d1284the hash of its verification record
Needs
no capability: a pure function

Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.

ΣEML 2026

Efficient New Language — a high-density semantic overlay for humans and AI agents.

This site’s demos run on the real EML toolchain, in your browser.

© 2026 EveMissLab (一言諾科技有限公司) / Neo.K. All rights reserved.