lerp

std.elementwise.lerp · Level L0

Linear interpolation from a to b by a scalar t.

a + t·(b − a)

Signature

lerp(a: f64[n], b: f64[n], t: f64[]) → 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.

af64[n]bf64[n]tf64[]SubtractspanMultiplystepAddyyf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference (1 - t) * a + t * b in exact rational arithmetic, on all 40 test cases.
  • All 159 float64 results inside the running error bound; the closest uses 80% of it.
  • Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
75%
bit-equal to the NumPy formula in float64
70%
largest error, in units in the last place
418

Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.

Identity

Calls
—
Called by
—
sha256:20f09691dd2fc258a9ee6e0c1c4ea59471bdde7a81985126ec8839b7b901b9f7

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

Control handle

Symbol
Ω:std.elementwise.lerp · Ω:lerp
Pins
sha256:725a0776c3a3556db83c3b8bcfd1aabd2abf8c1d4a52b0bc8300f12c9ab8d3fethis graph alone
Evidence
sha256:9ac1aeb726599a04e1f2e3c385db062f3a386536f93be565b3b8dc168cb41acathe 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.