From: Taylor R Campbell Date: Sat, 27 Oct 2018 02:11:14 +0000 (+0000) Subject: log1pexp(x) is never exactly x even if that's the best approximation. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~145 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=528f857892781a7352980f81e303d95348417b62;p=mit-scheme.git log1pexp(x) is never exactly x even if that's the best approximation. --- diff --git a/src/runtime/arith.scm b/src/runtime/arith.scm index ebe1e0ac4..ee2d0471f 100644 --- a/src/runtime/arith.scm +++ b/src/runtime/arith.scm @@ -2029,7 +2029,7 @@ USA. ((<= x flo:log-epsilon) (exp x)) ((<= x 18) (log1p (exp x))) ((<= x 33.3) (+ x (exp (- x)))) - (else x))) + (else (exact->inexact x)))) ;;; Lemma 1. If |d'| < 1/2, then |(d' - d)/(1 + d')| <= 2|d' - d|. ;;;