not_japh has asked for the wisdom of the Perl Monks concerning the following question:
... which does this:use bignum; $foo = 12345.6789; $bar = $foo->copy()->bfround(0); $baz = $foo - $bar; print "what's wrong here? $baz\n"; $byhand = 12345.6789 - 12345; print "as expected $byhand\n";
So the subtraction is getting zero, where I expected roughly 0.6789 also. And yes, I get the same thing if i use $baz = $foo->bsub($bar).what's wrong here? 0 as expected 0.6789
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: bignum frustration
by SuicideJunkie (Vicar) on Aug 15, 2012 at 21:39 UTC | |
|
Re: bignum frustration
by Athanasius (Archbishop) on Aug 16, 2012 at 03:26 UTC | |
by Anonymous Monk on Aug 16, 2012 at 14:38 UTC | |
by Athanasius (Archbishop) on Aug 16, 2012 at 15:39 UTC |