uniform_draws

std.seq.uniform_draws · Level L4

One uniform number in [0, 1) for each element of x, from the Wichmann–Hill generator started at state: a Scan of wichmann_hill_step, then the fractional part of s₁/m₁ + s₂/m₂ + s₃/m₃. The same state always gives the same numbers, on every backend. Its period is about 7·10¹²; it is not for cryptography.

u = (s₁/30269 + s₂/30307 + s₃/30323) mod 1

Signature

uniform_draws(state: i64[3], x: 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.

statei64[3]xf64[n]Scan·wichmann_hill_stepstates[30269.0, 30307.0, 30323.0]DividepartsReduceSumtotal1.0Moduuf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference Wichmann–Hill in exact fractions in exact rational arithmetic, on all 40 test cases.
  • All 110 float64 results inside the running error bound; the closest uses 54% 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 54% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
35%
largest error, in units in the last place
133

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

sha256:2702ff141b6cdd00d6b13858cd2c2acc974f47befb732d0764be57c362000a87

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

Control handle

Symbol
Ω:std.seq.uniform_draws · Ω:uniform_draws
Pins
sha256:541a1ff7748b764cf63fb061a307c0bedbd7e70de87230c2e6d2fb5912261f7cthis graph and the 1 it reaches through calls
Evidence
sha256:2a2f88647188bad9fae84103293099a8dd311ee8e5c22829a1711bb04913066fthe 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.