projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5342f7d
)
log1pexp(x) is never exactly x even if that's the best approximation.
author
Taylor R Campbell
<campbell@mumble.net>
Sat, 27 Oct 2018 02:11:14 +0000
(
02:11
+0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Sat, 27 Oct 2018 02:11:14 +0000
(
02:11
+0000)
src/runtime/arith.scm
patch
|
blob
|
history
diff --git
a/src/runtime/arith.scm
b/src/runtime/arith.scm
index ebe1e0ac4383eb5fb4a5a148bee01fe2dedd69bc..ee2d0471f91f2bbaf5cc8ea74ed830f16a6235e1 100644
(file)
--- 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|.
;;;