develooper Front page | perl.perl6.internals | Postings from March 2001

Re: PDD 4 internal data types, version 1.1

Thread Previous | Thread Next
From:
Paolo Molaro
Date:
March 9, 2001 15:59
Subject:
Re: PDD 4 internal data types, version 1.1
Message ID:
20010310010125.J10348@lettere.unipd.it
On 03/05/01 Dan Sugalski wrote:
> =item Arbitrary precision integers
> 
> Big integers, or bigints, are arbitrary-length integer numbers. The
> only limit to the number of digits in a bigint is the lesser of the
> amount of memory available or the maximum value that can be
> represented by a C<UV>. This will generally allow at least 4 billion
> digits, which ought to be far more than enough for anyone.

During the RFC process there was a lot of talk about reducing
the perl core and while there were different views on _what_
should be removed if at all, I don't think that including bigint 
and bigfloat was considered for that goal:-)

The core needs to be aware of overflows and have hooks to plug
an external bigint implementation when that happens, but should not
demand a specific bigint implementation.
I can't find the reference now, but it seams it will be required
for the base integer type to know how to upgrade to a bigint.
This is wrong: the interpreter should detect the overflow and
call a bigint handler. The bigint type will know how to convert 
the integers to its internal format, no need to assume a specific
format about that in the core.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About