HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0132928
)
numbers.test: Avoid inexact arithmetic in computation of fixnum-bit.
author
Mark H Weaver
<mhw@netris.org>
Tue, 16 Jul 2013 04:22:10 +0000
(
00:22
-0400)
committer
Mark H Weaver
<mhw@netris.org>
Tue, 16 Jul 2013 04:22:10 +0000
(
00:22
-0400)
* test-suite/tests/numbers.test (fixnum-bit): Rewrite to avoid
inexact arithmetic.
test-suite/tests/numbers.test
patch
|
blob
|
blame
|
history
diff --git
a/test-suite/tests/numbers.test
b/test-suite/tests/numbers.test
index
f0de798
..
9a03019
100644
(file)
--- a/
test-suite/tests/numbers.test
+++ b/
test-suite/tests/numbers.test
@@
-33,7
+33,10
@@
(not (not (object-documentation object))))
(define fixnum-bit
- (inexact->exact (+ (/ (log (+ most-positive-fixnum 1)) (log 2)) 1)))
+ (do ((i 0 (+ 1 i))
+ (n 1 (* 2 n)))
+ ((> n most-positive-fixnum)
+ (+ 1 i))))
(define fixnum-min most-negative-fixnum)
(define fixnum-max most-positive-fixnum)