logistic_growth
std.seq.logistic_growth · Level L2The trajectory of the discrete logistic model xₙ₊₁ = xₙ + r·xₙ(1 − xₙ/K) for s steps, s the length of steps (only its length is read). With K > 0, 0 ≤ r ≤ 1 and 0 ≤ x ≤ K, every step stays in [0, K], and 0 and K are fixed points. A Scan of logistic_step.
Signature
logistic_growth(x0: f64[m], rate: f64[m], K: f64[m], steps: f64[s]) → f64[s, m]
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.
- Equal to the reference
x = x + rate*x*(1 - x/K), s timesin exact rational arithmetic, on all 40 test cases. - All 634 float64 results inside the running error bound; the closest uses 86% 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 81% of it.
- correctly rounded (the float64 nearest the exact value)
- 70%
- bit-equal to the NumPy formula in float64
- 100%
- largest error, in units in the last place
- 64
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:44639cf8fc9c8da26304c7f506636a8a5d97da76441e54c1e15b6fc17f751234The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.logistic_growth · Ω:logistic_growth
- Pins
sha256:e1433ad1b70ea77dff94a540b22fe0b66b202bdf63d3ed2e2d81464bf2990296this graph and the 1 it reaches through calls- Evidence
sha256:868abd1c1c36cc995d82a97c5cdee1b7fe45ef5926c1516c0882a7c2b2b82f84the 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.