develooper Front page | perl.perl5.porters | Postings from May 2007

The State of BigNumber support in Perl

Thread Next
May 23, 2007 10:01
The State of BigNumber support in Perl
Message ID:
Hash: SHA1


this is just a quick summary of the current situation and my todo:

* The module space is nearly complete, Perl has big integer, big float and
  big rational support (for quite some time I might add)
  Likewise, there are three pragams (bigint, bignum and bigrat) that
  enable you to use big numbers much more easier and naturally,
  including NaN and inf support.

The only thing missing is that the three pragmas need to be lexical so you 
can use "no bigint;" to selectively disable their magic.

* The functional interface is more or less complete, I have actually run out
  of ideas on what functions to add. Exception:

  bcos(), bsin() and batan2() (as well as bpi() to enable conversion between
  angles) need to be added, including overloading for cos(), sin() and

Possible further ideas include bmuladd() and maybe baddmul(). That however 
is scrapping the proverbial bottom of the BigBarrel.

* Math::BigRat and Math::BigInt::Lite need to be dusted off and teached
  about bexp() and bnok().

* The two libraries (GMP and Pari) are complete and functional, but they
  need to get the new code for calculating integer logs much faster (already
  done, unreleased, for GMP, needs to be done for Pari)

* I have some tricks in mind how to speed up math with very small numbers
  under GMP, but I am not sure if it is worth the effect. Benchmarks are
  currently done.

* The Benchmarks/Timeline on my page is about 3 years old and in dire need
  to be updated.

I am not sure how much of that I can accomplish this weekend, as there is 
also Devel::Size waiting to be debugged...

All the best,


- -- 
 Signed on Wed May 23 18:56:14 2007 with key 0x93B84C15.
 View my photo gallery:
 PGP key on or per email.

 "Let me put this bluntly.  If we'd done Perl 6 on a schedule, you'd have
 it by now.  And it would be crap.  Perl 6 will be ready when all the
 inputs are there, and all the event-driven decision circuits have had a
 chance to make their decisions.  We're not the least bit afraid to slip
 our schedule, because we don't have a schedule.  We just have a plan."

  -- Larry Wall in 'The State of the Onion' 2002
Version: GnuPG v1.4.2 (GNU/Linux)


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About