John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
I'm thinking I have a list of numbers and occasionally one might be too big to handle without loss of precision. So I'd like to make my strings into normal numbers or into BigInts if they are large. But, without doing a lot of work of parsing which is what's normally built-in, how do I tell if the number will fit into a normal integer?
On a practical basis, I can probably just use the length (how many digits). But I still wonder if there is any kind of more-transparant support for numbers to turn into bigint/bigfloat automatically like is planned for Perl 6, or if I overlooked some "smart" conversion function.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: BigInt, some of the time
by Zaxo (Archbishop) on Feb 03, 2004 at 23:43 UTC | |
|
Re: BigInt, some of the time
by tachyon (Chancellor) on Feb 03, 2004 at 23:42 UTC | |
by John M. Dlugosz (Monsignor) on Feb 04, 2004 at 03:42 UTC |