From b3e1956b8a921c9d0bdc4cd6c2cd4a4d7dfb6eeb Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 25 Oct 2018 05:20:53 +0000 Subject: [PATCH] log(a/b), not log(a)/log(b). --- src/runtime/arith.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index 311fd583e..60459c49e 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -2231,8 +2231,8 @@ USA. (define (logit-exp t) (guarantee-real t 'logit-exp) (cond ((<= t -37) - ;; e^t < eps/2, so since log(e^t)/log(1 - e^t) = t - - ;; log(1 - e^t), we have + ;; e^t < eps/2, so since log(e^t/(1 - e^t)) = t - log(1 - + ;; e^t), we have ;; ;; |t - log(e^t/(1 - e^t))|/|log(e^t/(1 - e^t))| ;; = |log(1 - e^t)|/|t - log(1 - e^t)|. -- 2.25.1