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:
parent
c78b590e56
commit
300c6a76b3
1 changed files with 13 additions and 0 deletions
|
@ -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))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue