Re: [squeak-dev] [BUG] signedLongAt: 1 put:−2,147,483,648

John M McIntosh johnmci at smalltalkconsulting.com
Tue Dec 2 22:13:56 UTC 2008


I'm not sure I've seen a problem logged about that.

On 2-Dec-08, at 1:57 PM, Eliot Miranda wrote:

> Also needed to be fixed are Interpreter>>signed64BitIntegerFor: and  
> Interpreter>>primitiveSubtractLargeIntegers:.  Find attached.
>
> Once one fixes signed64BitValueFor: you'll find that (2  
> raisedToInteger: 63) negated - ((2 raisedToInteger: 63)-1) is  
> zero :)  i.e. subtract the most +ve integer from the most -ve and  
> you get zero, because primitiveSubtractLargeIntegers: falls into  
> exactly the same trap of assuming
>
>     0 - aValue
>
> is +ve for all -ve values, which isn't the case for the most -ve  
> value.
>

--
= 
= 
= 
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================






More information about the Squeak-dev mailing list