in reply to Re^2: C code translation to Perl
in thread C code translation to Perl
I have no clue why the values differs from the 5th element on.
You are using a 64-bit perl, (or possibly a 32-bit Perl with 64-bit IVs enabled), which means that your attempts to reproduce the results from the C code which uses 32-bit integers isn't working.
The type of bit-wise math in the C code relies heavily on the implicit mod 2**32 of intermediate results to work.
For a way to 'fix' it, see Re: emulate 32-bit on perl 64.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: C code translation to Perl
by bottch (Initiate) on Jan 31, 2012 at 16:18 UTC |