diff --git a/f2.go b/f2.go index 7c8f53f..3ee69ae 100644 --- a/f2.go +++ b/f2.go @@ -99,6 +99,9 @@ func joinDists(old_dist Dist, new_dist Dist, op string) (Dist, error) { switch { case old_dist.Type == "Lognormal" && new_dist.Type == "Lognormal" && op == "*": return Dist{Type: "Lognormal", Lognormal: multiplyLogDists(old_dist.Lognormal, new_dist.Lognormal), Samples: nil}, nil + case old_dist.Type == "Lognormal" && new_dist.Type == "Lognormal" && op == "/": + tmp_dist := Lognormal{low: 1.0 / new_dist.Lognormal.high, high: 1.0 / new_dist.Lognormal.low} + return Dist{Type: "Lognormal", Lognormal: multiplyLogDists(old_dist.Lognormal, tmp_dist), Samples: nil}, nil default: fmt.Printf("For now, can't do anything besides multiplying lognormals\n") }