My current Perl Projects - Timeline of BigInt/BigFloat

When asking about adding some new alias names for BigInt.pm, the question of documenting changes in the API to Math::BigInt came up. At first I only wanted to document recent changes, but then it occured to me it might be a good idea to have a complete timeline, and thus getting an idea of the changes from the beginning.

I created two scripts to generate the data below. The first one is called run.pl and runs a snipped of code for all BigInt versions stored in a subdirectory (the same script is used to generate bechmarks, more on that later). The snipped to create the timeline is called timeline. The output can then be redirected to a file or directly piped into the second script which generates the output below:

perl run.pl timeline | perl make_timeline.pl

You can download the scripts to re-create the data below here. You'll also need the old versions of BigInt unpacked into the subdirectory old. If you don't have them handy, download the complete archive.

API Timeline

Below is a full timeline for the public methods in Math::BigInt up to version v1.68. Note that I added is_int, is_pos and is_neg manually, since the script does not yet pick them up.

 added in v1.11:
  acmp
  bacmp
  bdec
  binc
  bint
  blcm
  bnan
  bstr
  bzero
  clone
  copy
  div
  is0
  is_even
  is_odd
  is_one
  is_zero
  objectify
  sign
  trace
 deleted in v1.11:
  abs
  external
  internal
  stringify

 added in v1.15:
  length

 added in v1.20:
  is_nan
  modify
 deleted in v1.20:
  is0

 added in v1.22:
  as_number
  digit

 added in v1.24:
  bround
  exponent
  mantissa
  parts

 added in v1.25:
  bfround

 added in v1.26:
  fround

 added in v1.27:
  bsqrt

 added in v1.31:
  bsstr
 deleted in v1.31:
  clone
  modify

 added in v1.32:
  accuracy
  precision
  round_mode

 added in v1.34:
  round

 added in v1.35:
  bceil
  bfloor
  binf
  is_inf

 added in v1.36:
  is_negative
  is_positive
 deleted in v1.36:
  acmp
  add
  div
  mul
  sub

 added in v1.37:
  bone
  modify
 deleted in v1.37:
  trace

 deleted in v1.39:
  bint

 added in v1.42:
  as_bin
  as_hex

 added in v1.43:
  div_scale

 deleted in v1.45:
  cmp

 added in v1.49:
  blog

 added in v1.50:
  bfac
  upgrade

 added in v1.51:
  config
  is_int

 added in v1.53:
  downgrade

 added in v1.57:
  bmodinv_not_yet_implemented
  bmodpow_not_yet_implemented

 added in v1.58:
  bmodinv
  bmodpow
 deleted in v1.58:
  bmodinv_not_yet_implemented
  bmodpow_not_yet_implemented

 added in v1.64:
  broot

 added in v1.68:
  as_int
  is_pos
  is_neg

Since v1.60 was the first new BigInt version that was distributed officially with a Perl version (v5.8.0), I would say that any API changes up to v1.60 are considered in flux, and that v1.60 should be used a guideline.
However, the API was quite stable for quite some time (e.g. nothing important got deleted since about v1.45), whith only moderate additions.

If you want to write code that is backwards compatible with older BigInt versions, avoid the following methods (if possible):

as_int
is_pos
is_neg
broot

It doesn't make much sense to car for even older versions, because these are very likely buggy and encouraging people to upgrade is considered a jolly good idea.

Notes

v1.11 is the first available version. I made the mistake of starting with v1.00 and also the versions up to 1.10 did not survive because I did not publish them back then. Mistakes of my younger self :)
Also, the earlier versions were quite a mess, and far from complete. I didn't even start working on BigFloat since version v1.12 or so...

Tels
Created: 2003-12-22
Last modified: 2003-12-22
Valid HTML 4.01! No patents!