Closed hyln9 closed 10 years ago
This code doesn't work with fx<?, but does work with <:
Ikarus Scheme version 0.0.3+ (revision 1574, build 2008-08-05, 64-bit) Copyright (c) 2006-2008 Abdulaziz Ghuloum
(define (fxlog2 x) (let lp ((x x) (y 1)) (if (fx<? y (fixnum-width)) (lp (fxior x (fxarithmetic-shift-right x y)) (fxarithmetic-shift-left y 1)) (fxbit-count x)))) Unhandled exception Condition components: &error &who: flatten-codes &message: "no exception label" &irritants: () (define (fxlog2 x) (let lp ((x x) (y 1)) (if (< y (fixnum-width)) (lp (fxior x (fxarithmetic-shift-right x y)) (fxarithmetic-shift-left y 1)) (fxbit-count x))))
(define (fxlog2 x) (let lp ((x x) (y 1)) (if (fx<? y (fixnum-width)) (lp (fxior x (fxarithmetic-shift-right x y)) (fxarithmetic-shift-left y 1)) (fxbit-count x)))) Unhandled exception Condition components:
Launchpad Details: #LP255879 Göran Weinholt - 2008-08-07 17:49:47 -0400
Fixed in 1575.
Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-08-07 18:06:19 -0400
This code doesn't work with fx<?, but does work with <:
Ikarus Scheme version 0.0.3+ (revision 1574, build 2008-08-05, 64-bit) Copyright (c) 2006-2008 Abdulaziz Ghuloum
Launchpad Details: #LP255879 Göran Weinholt - 2008-08-07 17:49:47 -0400