Zomalaja has asked for the wisdom of the Perl Monks concerning the following question:
I am not very experienced with perl and this test I am doing has me stumped, it appears to be rounding off numbers. Code:
use strict; use warnings; use Math::BigInt; my @CRCTable; $CRCTable[0] = Math::BigInt->new("0x3243bcfe21ef4468"); $CRCTable[1] = Math::BigInt->new("0xef453276bdbde566"); $CRCTable[2] = Math::BigInt->new("0x2342ed65876ab55f"); for (my $i=0; $i<3; $i++) { printf("%X\n",$CRCTable[$i]); }
Output is:
3243BCFE21EF4400 EF453276BDBDE800 2342ED65876AB600
Why the 2 trailing zeros ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Rounding off ? (updated)
by haukex (Archbishop) on Sep 13, 2018 at 22:38 UTC | |
by Your Mother (Archbishop) on Sep 13, 2018 at 23:03 UTC | |
by rizzo (Curate) on Sep 14, 2018 at 02:20 UTC | |
by haukex (Archbishop) on Sep 14, 2018 at 08:24 UTC | |
by hippo (Archbishop) on Sep 14, 2018 at 08:08 UTC | |
by syphilis (Archbishop) on Sep 14, 2018 at 12:56 UTC | |
by Zomalaja (Initiate) on Sep 14, 2018 at 14:52 UTC | |
|
Re: Rounding off ?
by Anonymous Monk on Sep 14, 2018 at 15:26 UTC | |
by syphilis (Archbishop) on Sep 15, 2018 at 08:16 UTC | |
by Anonymous Monk on Sep 15, 2018 at 19:25 UTC |