Re: swapping two numbers

[email protected] (Philippe "BooK" Bruhat) Sat, 24 Jun 2006 13:10:15 +0200
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
Le vendredi 23 juin 2006 à 17:40, Samy Kamkar écrivait:
> Although x could overflow in this case, where it wouldn't with an xor, 
> right?

I've quickly tried to overflow it, but I didn't manage to break it.
It looks like even if you overflow x with the first addition, you
cross the border in the other direction when doing the substraction.

-- 
 Philippe "BooK" Bruhat

 The only way to get a better government is to get better voters.
                                   (Moral from Groo The Wanderer #109 (Epic))