bezout_step

std.elementwise.bezout_step · Level L4

One step of the extended Euclidean algorithm on each pair: where r1 is above 0, with q = ⌊r0 / r1⌋, each of the pairs (r0, r1), (s0, s1), (t0, t1) becomes (second, first − q·second); a finished pair stays. The body that bezout runs.

q = ⌊r₀/r₁⌋; (x₀, x₁) ← (x₁, x₀ − q·x₁) for x = r, s, t

Signature

bezout_step(r0: i64[n], r1: i64[n], s0: i64[n], s1: i64[n], t0: i64[n], t1: i64[n]) → i64[n], i64[n], i64[n], i64[n], i64[n], i64[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.

r0i64[n]r1i64[n]s0i64[n]s1i64[n]0t0i64[n]t1i64[n]1GreaterliveWherer0_2Wheres0_2WheredivisorWheret0_2FloorDivqMultiplyq_r1Multiplyq_s1Multiplyq_t1Subtractnext_r1Subtractnext_s1Subtractnext_t1Wherer1_2Wheres1_2Wheret1_2r1_2i64[n]r0_2i64[n]s0_2i64[n]s1_2i64[n]t1_2i64[n]t0_2i64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference q = r0 // r1; (r1, r0 - q*r1), (s1, s0 - q*s1), (t1, t0 - q*t1) where r1 > 0 in exact rational arithmetic, on all 40 test cases.
  • All 798 int64 results are exact: the error is zero.
  • Interpreter and NumPy backend return bit-identical results.
  • At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
Accuracy in detail
correctly rounded (the int64 nearest the exact value)
100%
bit-equal to the NumPy formula in int64
100%
largest error, in units in the last place
0

Identity

Calls
—
Called by
sha256:f4a3d938bc7aba0b42104d65c510b7443056d603d8180956701c8aa02c48c6dc

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

Control handle

Symbol
Ω:std.elementwise.bezout_step · Ω:bezout_step
Pins
sha256:efeab366316af919d6c93bdc32654227696be3aac4ce793aeb634f30d2e87153this graph alone
Evidence
sha256:3b459c0d5c564889c516f01c179e638f13a71e9127df4a749d7ab4b08af66f78the 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.