in reply to Misunderstanding with Math::BigInt
The first problem is that 2.87... & 0.002 are not ints, so BigInt doesn't help. You need Math::BigFloat.
use Math::BigFloat; my($out,$diver,$grade) = map{ Math::BigFloat->new( $_ ) } split(/,/, ' 2.84894533078051,5,0.002', 3); print $out ** ( 1/$grade ) * $diver; 109907610023675317191879876436497649438076948727516195849531 529984640080900905500623346430661197750153976478077957100021 178235709357073884306056471657477469213296476869314035526387 8485678475840878789876340877189092206814894928600.3227150712 343412750871362367932483896648862164560115552012310931635017 ... <lots more snipped> ... 198626328593786831872991187091247473250005 perl>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Misunderstanding with Math::BigInt
by Smoke (Initiate) on Jun 30, 2005 at 21:19 UTC | |
by BrowserUk (Patriarch) on Jun 30, 2005 at 21:31 UTC | |
by Smoke (Initiate) on Jun 30, 2005 at 21:37 UTC | |
by Anonymous Monk on Jun 30, 2005 at 21:35 UTC |