rk4_step

std.func.rk4_step · Level L0

One classical Runge–Kutta step for y′ = f(y): y + (h/6)(k₁ + 2k₂ + 2k₃ + k₄) with k₁ = f(y), k₂ = f(y + (h/2)k₁), k₃ = f(y + (h/2)k₂), k₄ = f(y + h·k₃). The body rk4 scans; a template over the vector field f.

y + (h/6)(k₁ + 2k₂ + 2k₃ + k₄)

Signature

rk4_step(y: f64[n], h: 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.

yf64[n]0.5hf64[]6.0$fk1Multiplyh2DividehsMultiplyd1Addy12.0$fk2Multiplyk2bMultiplyd2Adds1Addy2$fk3Multiplyk3bMultiplyd3Adds2Addy3$fk4Adds3MultiplyincAddnextnextf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Agrees with the reference witness f = silu: one RK4 step written out to 80 digits (100-digit arithmetic), on all 40 test cases.
  • All 154 float64 results inside the running error bound; the closest uses 49% 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 55% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
82%
bit-equal to the NumPy formula in float64
86%
largest error, in units in the last place
1.53

Note

The witness is silu, x·σ(x). A rational field such as softsign would also do, but over many steps its exact rationals grow without bound; silu's verification runs at 100 digits.

Identity

Calls
—
Called by
sha256:e8b59d6bdc6b4257a6f98741dfe5dc1db26cb2d271d3d0690d0b6025168027f0

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

Control handle

Symbol
Ω:std.func.rk4_step[f=std.elementwise.silu]
Pins
sha256:af59eb4256fb99c9e0094789231b03485aa2c7a46ad2b470655f16ca95d7e5fdthis graph and the 1 it reaches through calls
Evidence
sha256:04dcab725f5eba63fd0fdabcda79a659b9e713a6d1571b9680862494f932e5d4the 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.