Re: Exactness Per Bothner 22 Oct 2005 00:58 UTC

Marcin 'Qrczak' Kowalczyk wrote:
> Any existing implementation uses any other representation by default
> than fixnums/bignums,

Well, the fixnum/bignum distinction is a bit more complicated in Kawa.

Kawa has:
* array-based bignums: a (reference to a) gnu.math.IntNum, one of whose
   fields is a reference to an array of 32-bits ints ("words").
* "small" bignums: if there is just a single word, it is stored
   directly in te gnu.math.IntNum, and the array field is null.
* "cached" bignums: there is a table of pre-allocated gnu.math.IntNum
   objects, representing -100..1024.

In addition, Kawa can work with unboxed Java byte/short/int/long.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/