]> birchwood-abbey.net Git - mit-scheme.git/commit
Fix various logsumexp tests.
authorTaylor R Campbell <campbell+mit-scheme@mumble.net>
Thu, 11 Feb 2021 04:17:04 +0000 (04:17 +0000)
committerTaylor R Campbell <campbell+mit-scheme@mumble.net>
Thu, 11 Feb 2021 05:04:24 +0000 (05:04 +0000)
commitdb6b40a6e183791ab96e207580610113169f1c97
tree8f3f0f822fecf2502ccd8b6dfb22ee81b1e2cb39
parentf8671e8b08213716478531c44133292ea2826187
Fix various logsumexp tests.

- logsumexp{..., -inf, +inf, ...} = log(... + e^-inf + e^+inf + ...)
  = log(... + 0 + inf + ...) = inf, not NaN.

- logsumexp(log(tiny1) + log(1 + tiny2)) = log(1 + tiny1 + tiny2),
  requires log1p to compute precisely.

(cherry picked from commit 1030084696b7dd118a1c6a1e323d3d7be74ebf22)
tests/runtime/test-arith.scm