hard_sigmoid

std.elementwise.hard_sigmoid · Level L1

Piecewise-linear sigmoid: relu6(x + 3) / 6. Calls relu6.

relu6(x + 3) / 6

Signature

hard_sigmoid(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.

xf64[n]3.0Addshift6.0relu6r6Divideyyf64[n]
  • input
  • operation
  • constant
  • call
  • output

Verification

  • Signature proven by NOVA’s shape solver, for every size.
  • Equal to the reference np.clip(x + 3, 0, 6) / 6 in exact rational arithmetic, on all 40 test cases.
  • All 147 float64 results inside the running error bound; the closest uses 68% 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 63% of it.
Accuracy in detail
correctly rounded (the float64 nearest the exact value)
90%
largest error, in units in the last place
1.00

Identity

Calls
Called by
—
sha256:35b511a2f4c46073cb7bebd7103c3282e0984205b679b42f7411701cb25fe867

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

Control handle

Symbol
Ω:std.elementwise.hard_sigmoid · Ω:hard_sigmoid
Pins
sha256:c699d15e0558d6566a207dcfa836f04595fa8ef552a1dc004c8ac9bad87b55c2this graph and the 1 it reaches through calls
Evidence
sha256:06e2856c5833656469b23afe9b6c2a6af453580fa418a5a9390758c8331238a6the 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.