in reply to Re: emulate 32-bit on perl 64
in thread emulate 32-bit on perl 64
I'm not sure that example brings any clearence.
I'm not the author and I use it as black box.
here is little part::
for ($h = 16; $h < 80; $h++) { $i[$h] = a2 ($i[$h - 3] ^ $i[$h - 8] ^ $i[$h - 14] ^ $i[$h - 16], +1); } sub a2 { my ($b, $a) = @_; my $c = $b >> 32 - $a; my $e = (1 << 32 - $a) - 1; my $d = $b & $e; return tos($d << $a | $c); } sub tos { my ($num) = @_; $num = $num - 4294967296 if $num > 4294967295; $num = $num + 4294967296 if $num < -2147483648; if ($num >= 0) { $num = $num - 2 ** 32 if ($num >> 31); } return $num; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: emulate 32-bit on perl 64
by Corion (Patriarch) on Jan 11, 2012 at 15:24 UTC | |
Re^3: emulate 32-bit on perl 64
by BrowserUk (Patriarch) on Jan 11, 2012 at 15:54 UTC | |
Re^3: emulate 32-bit on perl 64
by BrowserUk (Patriarch) on Jan 11, 2012 at 16:06 UTC |
In Section
Seekers of Perl Wisdom