From: Taylor R Campbell Date: Wed, 31 Oct 2018 16:44:43 +0000 (+0000) Subject: Comment what log-logistic and logit-exp are for. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~127 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=861d47756fc5555408ef13855e0201e14092b56a;p=mit-scheme.git Comment what log-logistic and logit-exp are for. --- 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)