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 10% 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 9% of it.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 81%
- largest error, in units in the last place
- 1.07
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:c46747f8928906daffd1f53a1d94285fe434d12dc171729aef100bce57edb2d3the 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.