Goal
As a user, calling .q(p) on a LogCauchy distribution for p very close to 0 or 1 should return a finite, correct quantile value (matching cdf(q(p)) ≈ p) instead of silently returning exactly 0 or Infinity long before the true answer becomes unrepresentable in float64.
Scope
src/dist/log-cauchy.js — the closed-form _q(p) implementation (LogCauchy = exp(Cauchy quantile)).
Acceptance Criteria
new dist.LogCauchy(0,2).q(1e-6) returns a finite nonzero value such that cdf(value) is close to 1e-6.
.q(0.9999) (and similarly close-to-1 p) returns a finite value rather than Infinity, consistent with the demonstrated true finite quantile pattern seen at .q(0.999).
- Round-trip
|cdf(q(p)) - p| stays within the precision-gate tolerance across the extended tail range this harness sweeps ([1e-6, 1e-1] ∪ [1-1e-1, 1-1e-6]).
- No regression in existing LogCauchy precision-gate /
test/dist-cases-continuous.js reference values.
Out of Scope
Broader closed-form quantile numerical-stability review of other log-transformed distributions — only LogCauchy is in scope here.
Goal
As a user, calling
.q(p)on aLogCauchydistribution forpvery close to 0 or 1 should return a finite, correct quantile value (matchingcdf(q(p))≈p) instead of silently returning exactly0orInfinitylong before the true answer becomes unrepresentable in float64.Scope
src/dist/log-cauchy.js— the closed-form_q(p)implementation (LogCauchy = exp(Cauchy quantile)).Acceptance Criteria
new dist.LogCauchy(0,2).q(1e-6)returns a finite nonzero value such thatcdf(value)is close to1e-6..q(0.9999)(and similarly close-to-1p) returns a finite value rather thanInfinity, consistent with the demonstrated true finite quantile pattern seen at.q(0.999).|cdf(q(p)) - p|stays within the precision-gate tolerance across the extended tail range this harness sweeps ([1e-6, 1e-1] ∪ [1-1e-1, 1-1e-6]).test/dist-cases-continuous.jsreference values.Out of Scope
Broader closed-form quantile numerical-stability review of other log-transformed distributions — only LogCauchy is in scope here.