Hello to everyone,
In the documentation of
Math::BigInt it's mentioned that it can work with numbers that have thousands od digits. Though, i ran to a slight proplem with the following code :
...
my ($in_out) = @_;
my ($out,$diver,$grade) = split(/,/, $in_out, 3);
my $in = Math::BigInt->new(($out)**(1/$grade)*$diver);
...
when $in_out is 2.84894533078051,5,0.002 , but when i try to print $in, i get :
10990761002367800000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000
my first question is WHY ?
and the second question is how do i make it print the real reasult which should be :
10990761002372220870980990761002372220870980980980990761002372220
87098099076100237222087098099076100237222087098098098099076100237
22208709809907610023722208709809907610023722208709809809809907610
0237222087098099076100237222087098
???
Large numbers broken up to multiple lines to prevent long lines causing horizontal scrolling, by davido.