On Apr 8, 2011, at 10:28 AM, Paul Koning wrote:
> On Apr 8, 2011, at 1:22 PM, Rustad, Mark D wrote:
>
>> Ulrich,
>>
>> On Apr 7, 2011, at 11:35 PM, Ulrich Windl wrote:
>>
>>> I just wonder how safe the code is:
>>>
>>> Doesn't the difference of two unsigned ints give an unsigned value? The
>>
On Apr 8, 2011, at 1:22 PM, Rustad, Mark D wrote:
> Ulrich,
>
> On Apr 7, 2011, at 11:35 PM, Ulrich Windl wrote:
>
>> I just wonder how safe the code is:
>>
>> Doesn't the difference of two unsigned ints give an unsigned value? The
>> assigning an unsigned int to a signed int will definitely
Ulrich,
On Apr 7, 2011, at 11:35 PM, Ulrich Windl wrote:
> I just wonder how safe the code is:
>
> Doesn't the difference of two unsigned ints give an unsigned value? The
> assigning an unsigned int to a signed int will definitely reduce the range...
Actually, that isn't true. There are 2^32 p
Hi!
I just wonder how safe the code is:
Doesn't the difference of two unsigned ints give an unsigned value? The
assigning an unsigned int to a signed int will definitely reduce the range...
I feel that
s32 diff = (s32) n1 - (s32) n2;
also doesn't make the problem go away, unless ypou promot