commit 5b52cf32976a8e22d4d85c21ba1219ec7aa89859
parent b0f48286d5e230a6b6ed9041f89ce9aa7c33a5ae
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date: Mon, 10 Jun 2024 01:13:17 +0200
fengshui
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/f.go b/f.go
@@ -171,7 +171,7 @@ func multiplyAsSamples(dist1 Dist, dist2 Dist) Dist {
zs[i] = xs[i] * ys[i]
}
- fmt.Printf("%v\n", zs)
+ // fmt.Printf("%v\n", zs)
return FilledSamples{xs: zs}
}
@@ -239,7 +239,7 @@ func joinDists(old_dist Dist, new_dist Dist, op string) (Dist, error) {
}
/* Pretty print distributions */
-func prettyPrint90CI(low float64, high float64) {
+func prettyPrint2Floats(low float64, high float64) {
// fmt.Printf("=> %.1f %.1f\n", low, high)
switch {
case math.Abs(low) >= 1_000_000_000_000:
@@ -278,7 +278,7 @@ func prettyPrintDist(dist Dist) {
switch v := dist.(type) {
case Lognormal:
fmt.Printf("=> ")
- prettyPrint90CI(v.low, v.high)
+ prettyPrint2Floats(v.low, v.high)
case FilledSamples:
tmp_xs := make([]float64, N_SAMPLES)
copy(tmp_xs, v.xs)
@@ -289,10 +289,10 @@ func prettyPrintDist(dist Dist) {
low := tmp_xs[low_int]
high_int := N_SAMPLES * 19 / 20
high := tmp_xs[high_int]
- prettyPrint90CI(low, high)
+ prettyPrint2Floats(low, high)
case Beta:
fmt.Printf("=> beta ")
- prettyPrint90CI(v.a, v.b)
+ prettyPrint2Floats(v.a, v.b)
default:
fmt.Printf("%v", v)
}