diff --git a/lib/srfi/151/bit.c b/lib/srfi/151/bit.c index 45254b64..a02e90bd 100644 --- a/lib/srfi/151/bit.c +++ b/lib/srfi/151/bit.c @@ -350,7 +350,7 @@ static const char log_table_256[256] = { #define LT(n) n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - LT(5), LT(6), LT(7), LT(7), LT(7), LT(7), LT(7), + LT(5), LT(6), LT(6), LT(7), LT(7), LT(7), LT(7), LT(8), LT(8), LT(8), LT(8), LT(8), LT(8), LT(8), LT(8) }; diff --git a/lib/srfi/151/test.sld b/lib/srfi/151/test.sld index 4c59a03f..92fd6782 100644 --- a/lib/srfi/151/test.sld +++ b/lib/srfi/151/test.sld @@ -5,6 +5,13 @@ (define (run-tests) (test-begin "srfi-151: bitwise operations") + (test 0 (integer-length #b0)) + (test 1 (integer-length #b1)) + (test 2 (integer-length #b10)) + (test 3 (integer-length #b100)) + (test 4 (integer-length #b1000)) + (test 5 (integer-length #b10000)) + (test 6 (integer-length #b110000)) (test 0 (bitwise-and #b0 #b1)) (test 1 (bitwise-and #b1 #b1)) (test 0 (bitwise-and #b1 #b10))