mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-30 21:56:53 -06:00
G709: use stable tail at F median
This commit is contained in:
@@ -379,7 +379,7 @@ pub(super) fn f_inv(a: &[Arg], _: C) -> R<Value> {
|
||||
if p == 0.0 {
|
||||
return num_val(0.0);
|
||||
}
|
||||
let value = if p <= 0.5 { invert(|x| f_cdf(x, d1, d2), p, 0.0, 1.0, 1e60) } else { invert(|x| f_upper(x, d1, d2), 1.0 - p, 0.0, 1.0, 1e60) };
|
||||
let value = if p < 0.5 { invert(|x| f_cdf(x, d1, d2), p, 0.0, 1.0, 1e60) } else { invert(|x| f_upper(x, d1, d2), 1.0 - p, 0.0, 1.0, 1e60) };
|
||||
num_val(value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user