From: Taylor R Campbell Date: Thu, 25 Oct 2018 05:05:59 +0000 (+0000) Subject: Inadvertently substituted d0 for d2. Fix. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~168 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6c6db4beaee4e7f733607e01463430081083b8c2;p=mit-scheme.git Inadvertently substituted d0 for d2. Fix. No change in conclusion -- there was no convenient cancellation or anything as a consequence of this. --- diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index 6c766891c..b417b4843 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -2113,13 +2113,13 @@ USA. ;; relative error d2, then we get ;; ;; (1 + d2)/[(1 + (1 + d0) e^{-x})(1 + d1)] - ;; = (1 + d0)/[1 + e^{-x} + d0 e^{-x} + ;; = (1 + d2)/[1 + e^{-x} + d0 e^{-x} ;; + d1 + d1 e^{-x} + d0 d1 e^{-x}] - ;; = (1 + d0)/[(1 + e^{-x})(1 + d0 e^{-x}/(1 + e^{-x}) + ;; = (1 + d2)/[(1 + e^{-x})(1 + d0 e^{-x}/(1 + e^{-x}) ;; + d1/(1 + e^{-x}) ;; + d0 d1 e^{-x}/(1 + e^{-x}))]. - ;; = (1 + d0)/[(1 + e^{-x})(1 + d')] - ;; = [1/(1 + e^{-x})] (1 + d0)/(1 + d') + ;; = (1 + d2)/[(1 + e^{-x})(1 + d')] + ;; = [1/(1 + e^{-x})] (1 + d2)/(1 + d') ;; ;; where ;; @@ -2129,15 +2129,14 @@ USA. ;; ;; By Lemma 2 this relative error is bounded by ;; - ;; 2|d0 - d'| - ;; = 2|d0 - d0 e^{-x}/(1 + e^{-x}) + ;; 2|d2 - d'| + ;; = 2|d2 - d0 e^{-x}/(1 + e^{-x}) ;; - d1/(1 + e^{-x}) ;; - d0 d1 e^{-x}/(1 + e^{-x})| - ;; <= 2|d0| + 2|d0 e^{-x}/(1 + e^{-x})| + ;; <= 2|d2| + 2|d0 e^{-x}/(1 + e^{-x})| ;; + 2|d1/(1 + e^{-x})| ;; + 2|d0 d1 e^{-x}/(1 + e^{-x})| - ;; <= 2|d0| + 2|d0| + 2|d1| + 2|d0 d1| - ;; <= 4|d0| + 2|d1| + 2|d0 d1| + ;; <= 2|d2| + 2|d0| + 2|d1| + 2|d0 d1| ;; <= 6 eps + 2 eps^2. ;; (/ 1 (+ 1 (exp (- x)))))