[r6rs-discuss] [Formal] bitwise-bit-count should return -ve on -ve argument.

From: John Cowan <cowan>
Date: Sat, 21 Apr 2007 03:03:11 -0400

Ben Harris scripsit:

> This problem can be
> dodged by having bitwise-bit-count return the number of set bits mod0
> infinity, or more prosaically, by returning the number of set bits in
> a non-negative argument, and _minus_ the number of clear bits in a
> negative one.

I think this is a good idea for the reasons given, but the phrase
"mod0 infinity" should not be used, as Scheme has no exact infinity.

-- 
John Cowan              http://www.ccil.org/~cowan      cowan at ccil.org
"After all, would you consider a man without honor wealthy, even if his
Dinar laid end to end would reach from here to the Temple of Toplat?"
"No, I wouldn't", the beggar replied.  "Why is that?" the Master asked.
"A Dinar doesn't go very far these days, Master.        --Kehlog Albran
Besides, the Temple of Toplat is across the street."      The Profit
Received on Sat Apr 21 2007 - 03:03:11 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC