Skip to content

Commit b793093

Browse files
committed
test: Tighten inverse beta round trips
1 parent 424af0b commit b793093

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/function/beta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ mod tests {
993993
let quantile = inv_beta_reg(a, b, probability);
994994
if quantile > 0.0 && quantile < 1.0 {
995995
let recovered = beta_reg(a, b, quantile);
996-
let tolerance = 5e-11 * probability.max(1.0 - probability);
996+
let tolerance = 5e-11 * probability.min(1.0 - probability);
997997
assert!(
998998
(recovered - probability).abs() <= tolerance,
999999
"a={a:?}, b={b:?}, probability={probability:?}, quantile={quantile:?}, recovered={recovered:?}"

0 commit comments

Comments
 (0)