Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 rifling through the Monastery: (5)
As of 2014-08-20 23:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (125 votes), past polls