who ever performed bit logic on large negative integer?

Stephan Rudlof sr at evolgo.de
Sat Jan 26 17:26:06 UTC 2008

It's nice that LargeIntegersPlugin has *not* to be fixed (just checked), since its bit logic prims only cover bit logic for LargePositiveIntegers (both receiver and arg) and they fail for LargeNegativeIntegers (so the smalltalk fall back methods are used).


On 26.01.2008 04:12, nicolas cellier wrote:
> SmallInteger < 0 are stored directly in two complement native format 
> (well, except the tag bits)
> But LargeNegativeInteger are stored same as their absolute value.
> This does simplify some algorithms. But this leads to quite tricky ones 
> when bit logic is to be performed based on two complement.
> And whenever tricks are used, bugs frequency generally tends to 
> increase. I believe long life bugs are lying in such swamps.
> That's why i'm very proud of finding accidentaly 
> http://bugs.squeak.org/view.php?id=6874 via 
> http://bugs.squeak.org/view.php?id=6873.
> As usual, most of you won't ever care of it.
> Yeah, one more useless bugfix i am specialized in since the probability 
> you bump into it must not exceed 1.0e-8 per hour of Smalltalking.
> But who knows, it's a kind of insurance in case a silly engineer had the 
> idea to run nearest nuclear plant in Squeak!
> And well, it's also for the beauty of mathematics!
> Nicolas

Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3

More information about the Squeak-dev mailing list