fermi

A minimalist calculator for estimating with distributions
Log | Files | Refs | README

commit ce399ac24eb6ec64162a24a0c668b16ff0456bd8
parent 5bb015ab692f3b408ca19fb20799bd5de38a60a1
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date:   Sun,  9 Jun 2024 14:08:19 +0200

reach feature parity with past parser

Diffstat:
Mf2.go | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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") }