fix error when multiplying negative samples times lognormal
This commit is contained in:
parent
e93316446c
commit
5e0020a112
2
fermi.go
2
fermi.go
|
@ -252,7 +252,7 @@ func multiplyLogDistAndScalar(l Lognormal, s Scalar) (Dist, error) {
|
||||||
if s == 0.0 {
|
if s == 0.0 {
|
||||||
return Scalar(0.0), nil
|
return Scalar(0.0), nil
|
||||||
} else if s < 0.0 {
|
} else if s < 0.0 {
|
||||||
return operateDistsAsSamples(s, l, "+")
|
return operateDistsAsSamples(s, l, "*")
|
||||||
} else {
|
} else {
|
||||||
return multiplyLogDists(l, Lognormal{low: float64(s), high: float64(s)}), nil
|
return multiplyLogDists(l, Lognormal{low: float64(s), high: float64(s)}), nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user