From 861d47756fc5555408ef13855e0201e14092b56a Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 31 Oct 2018 16:44:43 +0000 Subject: [PATCH] Comment what log-logistic and logit-exp are for. --- src/runtime/arith.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index 0adb24ef5..edf7ca3fe 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -2408,6 +2408,8 @@ USA. (log (/ (+ 1/2 p-1/2) (- 1/2 p-1/2)))))) ;;; log logistic(x) = log (1/(1 + e^{-x})) = -log (1 + e^{-x}) +;;; +;;; This is the log density of the logistic distribution. (define (log-logistic x) (guarantee-real x 'log-logistic) @@ -2419,6 +2421,8 @@ USA. (flo:- 0. (flo:log (flo:+ 1. (flo:exp -1.))))) ;;; logit(e^t) = log e^t/(1 - e^t) +;;; +;;; Inverse of log logistic. (define (logit-exp t) (guarantee-real t 'logit-exp) -- 2.25.1