fix error when multiplying negative samples times lognormal

This commit is contained in:
NunoSempere 2024-12-27 23:21:14 +01:00
parent e93316446c
commit 5e0020a112

View File

@ -252,7 +252,7 @@ func multiplyLogDistAndScalar(l Lognormal, s Scalar) (Dist, error) {
if s == 0.0 {
return Scalar(0.0), nil
} else if s < 0.0 {
return operateDistsAsSamples(s, l, "+")
return operateDistsAsSamples(s, l, "*")
} else {
return multiplyLogDists(l, Lognormal{low: float64(s), high: float64(s)}), nil
}