Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Adding really big numbers

by Khen1950fx (Canon)
on Feb 23, 2013 at 01:58 UTC ( #1020266=note: print w/ replies, xml ) Need Help??


in reply to Adding really big numbers

What lib are you using? How are you declaring accuracy and precision? Maybe this'll help:

#!/usr/bin/perl -l BEGIN { $| = 1; $^W = 1; } use strict; use warnings; use bignum lib => 'FastCalc'; use Memoize; memoize('really_big'); really_big(); sub really_big { bignum->accuracy(15); bignum->precision(15); my $big_number = 3710728753390210279879799822083759024651013574025 +0 + 46376937677490009712648124896970078050417018260538; print $big_number; }


Comment on Re: Adding really big numbers
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2015-07-31 01:32 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 (274 votes), past polls