From: Taylor R Campbell Date: Thu, 3 Nov 2016 19:34:52 +0000 (+0000) Subject: Fix fencepost in decoding powers of two into IEEE 754 components. X-Git-Tag: mit-scheme-pucked-9.2.12~254^2~12 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f9ad8aef22aac21fe734fb79d36c1c7b50839f17;p=mit-scheme.git Fix fencepost in decoding powers of two into IEEE 754 components. --- diff --git a/src/runtime/ieee754.scm b/src/runtime/ieee754.scm index 2f6741109..a2a51b2ff 100644 --- a/src/runtime/ieee754.scm +++ b/src/runtime/ieee754.scm @@ -80,7 +80,7 @@ USA. (cond ((<= 1 x) ;Nonnegative exponent (normal) (let loop ((exponent 0) (x x)) (cond ((< emax exponent) (if-infinite sign)) - ((< base x) (loop (+ exponent 1) (/ x base))) + ((<= base x) (loop (+ exponent 1) (/ x base))) (else (if-normal sign exponent (significand x)))))) ((< (expt base emin) x) ;Negative exponent, normal (let loop ((exponent 0) (x x))