in reply to bignum frustration
Hello not_japh, and welcome to the Monastery!
#! perl use strict; use warnings; use bignum; my $foo = 1_234_500_000_000_000_000_000_000.6789; my $bar = int $foo; my $baz = $foo - $bar; print 'baz = ', $baz, "\n";
Output:
baz = 0.6789
Often, the simplest solution is also the best. ;-)
Update: Added greeting.
Athanasius <°(((>< contra mundum
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: bignum frustration
by Anonymous Monk on Aug 16, 2012 at 14:38 UTC | |
by Athanasius (Archbishop) on Aug 16, 2012 at 15:39 UTC |