This commit is contained in:
James Cor
2026-01-30 15:09:04 -08:00
parent 5bc6ac585b
commit 68f575359b

View File

@@ -243,17 +243,11 @@ const (
// treated as a uniform random number between [0,1),
// is less than this percentage.
func weibullCheck(size, thisSize, hash uint32) bool {
//start := -math.Expm1(-math.Pow(startx/L, K))
startx := float64(size - thisSize)
tmp := startx / L
pow := tmp * tmp * tmp * tmp
start := -math.Expm1(-pow)
pow := float64(size-thisSize) / L
start := -math.Expm1(-(pow * pow * pow * pow))
//end := -math.Expm1(-math.Pow(endx/L, K))
endx := float64(size)
tmp = endx / L
pow = tmp * tmp * tmp * tmp
end := -math.Expm1(-pow)
pow = float64(size) / L
end := -math.Expm1(-(pow * pow * pow * pow))
p := float64(hash) / maxUint32
d := 1 - start