in reply to bignum with (s)printf - 64bit OS OK, 32bit incorrect. What to do?

I would suggest reading BigInt Math docs in addition to BigInt Main docs. A BigInt is an object.
#!/usr/bin/perl -w use strict; use bignum; use Math::BigInt; my $i = Math::BigInt->new(4300000000); print $i->as_bin(), "\n"; #prints 0b100000000010011001100101100000000 my $j = 4300000000; print $j->as_bin(), "\n"; #also prints 0b100000000010011001100101100000000
ActiveState Perl 5.10.1 on Win XP 32 bit
  • Comment on Re: bignum with (s)printf - 64bit OS OK, 32bit incorrect. What to do?
  • Download Code

Replies are listed 'Best First'.
Re^2: bignum with (s)printf - 64bit OS OK, 32bit incorrect. What to do?
by geep999 (Novice) on Jul 02, 2011 at 11:02 UTC
    Thank 'ee. That'll do nicely.
    And have read as suggested, too!
    Cheers,
    Peter