1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 20:05:32 +02:00

(logcount): New tests, exercising some negatives.

This commit is contained in:
Kevin Ryde 2003-05-05 23:04:02 +00:00
parent c78b590e56
commit 300c6a76b3

View file

@ -1745,3 +1745,16 @@
;;;
;;; inexact->exact
;;;
;;;
;;; logcount
;;;
(with-test-prefix "logcount"
(with-test-prefix "-2^i, meaning ...11100..00"
(do ((n -1 (ash n 1))
(i 0 (1+ i)))
((> i 256))
(pass-if n
(= i (logcount n))))))