From 8675d98784e8927e2a6b5ead1223051fc8c9e0b7 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Thu, 2 Nov 2023 23:26:06 +0000 Subject: [PATCH] fix the base of the log for squiggle.bc --- bc/squiggle.bc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bc/squiggle.bc b/bc/squiggle.bc index 51f1c287..70f00a9a 100644 --- a/bc/squiggle.bc +++ b/bc/squiggle.bc @@ -13,7 +13,7 @@ define sample_unit_uniform(){ define sample_unit_normal(){ u1=sample_unit_uniform() u2=sample_unit_uniform() - z = sqrt(-2 * log(u1, 2)) * sin(2 * pi * u2) + z = sqrt(-2 * l(u1)) * sin(2 * pi * u2) return z } @@ -66,7 +66,7 @@ define sample_to(low, high){ we need but get a normal with 90% confidence interval [log(a), log(b)]. Then see code for sample_normal_from_90_confidence_interval */ - loglow = log(low, 2) - loghigh = log(high, 2) + loglow = l(low) + loghigh = l(high) return e(sample_normal_from_90_confidence_interval(loglow, loghigh)) }