log1mexp
std.elementwise.log1mexp · Level L5log(1 − e^(−x)) for x > 0, accurate everywhere (Mächler's rule): log(−expm1(−x)) below log 2, log1p(−e^(−x)) above. Each naive form loses its digits on one side.
x < log 2 ? log(−expm1(−x)) : log1p(−e^(−x))
Signature
log1mexp(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.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Agrees with the reference
log(1 − exp(−x)), in exact arithmeticto 80 digits (100-digit arithmetic), on all 40 test cases. - All 142 float64 results inside the running error bound; the closest uses 16% of it.
- Interpreter and NumPy backend return bit-identical results.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 64%
- bit-equal to the NumPy formula in float64
- 36%
- largest error, in units in the last place
- 2.17
Identity
Calls
—
Called by
—
sha256:2f5ca6a7684974c81dfeb099a49df15f441359e8ac26d63f4d355b88e5ba8451The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.elementwise.log1mexp · Ω:log1mexp
- Pins
sha256:cffcd49819a8a6de5730f4d66bf7da14acb814ac3c7419f95e06a031fccb3e72this graph alone- Evidence
sha256:d4baa671488e6684c00f5259e221c946a2508d2d3f46b1a9d98dd6d9fb643bcfthe 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.