Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Question on simple arithmetic using perl

by eyepopslikeamosquito (Canon)
on Sep 29, 2011 at 10:58 UTC ( #928519=note: print w/ replies, xml ) Need Help??


in reply to Question on simple arithmetic using perl

Also, be aware that Perl supports arbitrary size integers via the core Math::BigInt module. For example:

use Math::BigInt; my $x = Math::BigInt->new('123456789012345678901234567890'); my $y = '123456789012345678901234567890'; $x += 1; $y += 1; print "x=$x\n"; print "y=$y\n";
prints:
x=123456789012345678901234567891 y=1.23456789012346e+029
Update: See also bigint and bignum.


Comment on Re: Question on simple arithmetic using perl
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2015-07-05 03:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls