Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Standard Modules > 8.26. bigint

bigint

Provides big-integer support for Perl. Prior to 5.8, and for 32-bit architectures, Perl supported whatever numbers your platform supported. This wasn’t always the best solution when dealing with large numbers. Thus, the integer-related math modules were born, including Math::BigInt and bigint. Math::BigInt and bigint override all of the core Perl math functions and still support large integers. As of Perl 5.8, bigint.pm is shipped with the Perl source kit.

For example:

#!/usr/local/bin/perl -w
use bigint;

my $num1 = 4;
my $num2 = 1024;
 print $num1 ** $num2, "\n";  # Prints a very large number

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint