From f9ad8aef22aac21fe734fb79d36c1c7b50839f17 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 3 Nov 2016 19:34:52 +0000 Subject: [PATCH] Fix fencepost in decoding powers of two into IEEE 754 components. --- src/runtime/ieee754.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.25.1