Re: Zero-fill right shift.

From: Date: Tue, 03 Feb 2015 15:12:22 +0000
Subject: Re: Zero-fill right shift.
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-81721@lists.php.net to get a copy of this message
On 3 February 2015 at 15:02, Andrea Faulds <ajf@ajf.me> wrote: > Why would it be promoted?! The high bit is the 63rd bit. It fits within a long. > I'm assuming your bigint implementation would want to respect signage. When does it promote? 63rd to preserve signage? 4611686018427387904 // 1 << 62 - int 9223372036854775808 // 1 << 63 - bigint 18446744073709551616 // 1 << 64 - bigint Or 64th to for complete madness? 4611686018427387904 // 1 << 62 - int -9223372036854775808 // 1 << 63 - int 18446744073709551616 // 1 << 64 - bigint

« previous php.internals (#81721) next »