in reply to Misunderstanding with Math::BigInt
so you are making the calculation with floats and then converting the result to a bigint.my ($in_out) = @_; my ($out,$diver,$grade) = split(/,/, $in_out, 3); my $float = ($out)**(1/$grade)*$diver; my $in = Math::BigInt->new($float);
You have to convert first the numbers to bigints and then make the math!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Misunderstanding with Math::BigInt
by Smoke (Initiate) on Jun 30, 2005 at 21:04 UTC | |
by jgamble (Pilgrim) on Jun 30, 2005 at 21:20 UTC | |
by salva (Canon) on Jun 30, 2005 at 21:13 UTC |