Fix stray line, clarify, and simplify.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 25 Oct 2018 04:57:30 +0000 (04:57 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 25 Oct 2018 04:57:30 +0000 (04:57 +0000)
src/runtime/arith.scm

index 665dd5e483a44b13c140e707a8550060ae695e1b..ba1753a117e0229634c4a8443fc11ab9634fb168 100644 (file)
@@ -2063,13 +2063,13 @@ USA.
          ;; raise inexact and underflow here.)
          0.)
        ((<= x -37)
-         ;; e^x < eps/2, so
+         ;; e^x < eps, so
          ;;
          ;;     |e^x - e^x/(1 + e^x)|/|e^x/(1 + e^x)|
          ;;     <= |1 - 1/(1 + e^x)|*|1 + e^x|
+         ;;      = |(1 + e^x - 1)/(1 + e^x)|*|1 + e^x|
          ;;      = |e^x/(1 + e^x)|*|1 + e^x|
-         ;;      = |e^x/(1 + e^x) + e^x|
-         ;;     <= |e^x + e^x|
+         ;;      = |e^x|
          ;;      < eps.
          ;;
          (exp x))