range.exponential / exponentialFrom #10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Missing
range.exponential min maxandrange.exponentialFrom origin min max.Why
lineargrows the bound proportionally to size, so withmaxSize = 100the span is at most 100x the smallest. Magnitudes like2^53,1.0e100or "just below the Nix integer limit" are unreachable in a reasonable range. Hedgehog'sRange.exponential*scale the bound geometrically with size; this is the only range constructor it has that nixcheck lacks.Suggested shape
bounds sizeinterpolatesmin + (max - min) * (2^(size*k/100) - 1) / (2^k - 1)or similar; ints and floats through the same formula (range.linearalready works with float endpoints).Implemented in
a043d6e, pushed to main.