proj

std.linalg.proj · Level L0

Orthogonal projection of x onto the line spanned by u. Calls dot twice.

(x·u / u·u)·u

Signature

proj(x: f64[n], u: f64[n]) → f64[n]

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.

xf64[n]uf64[n]dotxudotuuDividecMultiplyppf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference (np.dot(x, u) / np.dot(u, u)) * u in exact rational arithmetic, on all 40 test cases.
  • All 122 float64 results inside the running error bound; the closest uses 61% 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 47% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
74%
largest error, in units in the last place
2.42

Identity

Calls
Called by
sha256:a7346794b0cb14b83033454c8a56cd070778b5f65c965dc9d5b7b93635d567ec

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

Control handle

Symbol
Ω:std.linalg.proj · Ω:proj
Pins
sha256:e1587a6bba8dc9010594174b8ed8137deedd08383a191843e12bc9135cc5e429this graph and the 1 it reaches through calls
Evidence
sha256:9b633be5fcfb0eedcb76c03551dc09e08ff4bbd48289f7852d04f3c2cb353c4ethe 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.